mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-1533: ResultSetMap don't work with aliases when using joined entites #1923
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Dec 13, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user bostjan:
When using entityNamespace and ResultSetMapping with joined entites you get hydration error.
Example:
EntityNamespace is set to "Project\Model"
I have result set mapping:
->addEntityResult(':Entity', 'e')
->addJoinedEntityResult(':OtherEntity', 'oe', 'e', 'other')
you will get error:
{quote}Notice: Undefined index: Projet\Model\OtherEntity in Doctrine\ORM\Internal\Hydration\ObjectHydrator.php on line 371{quote}
solution is to use full names for entites:
->addEntityResult('Project\Model\Entity', 'e')
->addJoinedEntityResult('Project\Model\OtherEntity', 'oe', 'e', 'other')