Skip to content

Commit

Permalink
- fixing issue of calling undefined method in the EntitySerializer
Browse files Browse the repository at this point in the history
  • Loading branch information
24198 committed May 23, 2019
1 parent 836c77f commit 7139917
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7139917

Please sign in to comment.