DDC-1533: ResultSetMap don't work with aliases when using joined entites #1923

Open
opened 2026-01-22 13:32:06 +01:00 by admin · 0 comments
Owner

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')

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')
admin added the Bug label 2026-01-22 13:32:06 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1923