From 7139917230723d97b9b8c99e27dcd5c3f7d2e8e1 Mon Sep 17 00:00:00 2001 From: Hotlander Date: Thu, 23 May 2019 12:30:30 +0200 Subject: [PATCH] - fixing issue of calling undefined method in the EntitySerializer --- .../Bundle/CoreBundle/Serializer/EntitySerializer.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Marello/Bundle/CoreBundle/Serializer/EntitySerializer.php b/src/Marello/Bundle/CoreBundle/Serializer/EntitySerializer.php index e74dc368a..42c8bdedb 100644 --- a/src/Marello/Bundle/CoreBundle/Serializer/EntitySerializer.php +++ b/src/Marello/Bundle/CoreBundle/Serializer/EntitySerializer.php @@ -116,7 +116,10 @@ protected function serializeItem($entity, $entityClass, EntityConfig $config, ar if ($this->isAssociation($propertyPath, $entityMetadata, $fieldConfig)) { if (is_object($value)) { $targetConfig = $this->getTargetEntity($config, $field); - $targetEntityClass = $this->getAssociationTargetClass($path, $entityMetadata, $value); + $targetEntityClass = $this->doctrineHelper->getAssociationTargetClass( + $entityMetadata, + $path + ); $targetEntityId = $this->dataAccessor->getValue( $value, $this->doctrineHelper->getEntityIdFieldName($targetEntityClass)