diff --git a/src/EventSubscriber/TranslatableEventSubscriber.php b/src/EventSubscriber/TranslatableEventSubscriber.php index 4f05e1c1..8fd0932e 100644 --- a/src/EventSubscriber/TranslatableEventSubscriber.php +++ b/src/EventSubscriber/TranslatableEventSubscriber.php @@ -126,7 +126,7 @@ private function mapTranslation(ClassMetadataInfo $classMetadataInfo, ObjectMana /** @var ClassMetadataInfo $targetEntityClassMetadataInfo */ $targetEntityClassMetadataInfo = $objectManager->getClassMetadata($targetEntity); - $singleIdentifierFieldName = $targetEntityClassMetadataInfo->getSingleIdentifierFieldName(); + $singleIdentifierColumnName = $targetEntityClassMetadataInfo->getSingleIdentifierColumnName(); $classMetadataInfo->mapManyToOne([ 'fieldName' => 'translatable', @@ -135,7 +135,7 @@ private function mapTranslation(ClassMetadataInfo $classMetadataInfo, ObjectMana 'fetch' => $this->translationFetchMode, 'joinColumns' => [[ 'name' => 'translatable_id', - 'referencedColumnName' => $singleIdentifierFieldName, + 'referencedColumnName' => $singleIdentifierColumnName, 'onDelete' => 'CASCADE', ]], 'targetEntity' => $targetEntity,