protected function getByReferenceMappings(ClassMetadata $cm)
{
$byReferenceMappings = [];
foreach ($cm->getReflectionClass()->getProperties() as $property) {
$byReferenceAnnotation = $this->reader->getPropertyAnnotation($property, 'PartKeepr\\DoctrineReflectionBundle\\Annotation\\ByReference');
if ($byReferenceAnnotation !== null) {
$byReferenceMappings[] = $property->getName();
}
}
return $byReferenceMappings;
}