DDC-2759: ArrayHydration: Only first entity in OneToMany association is hydrated #3451

Closed
opened 2026-01-22 14:20:07 +01:00 by admin · 5 comments
Owner

Originally created by @doctrinebot on GitHub (Oct 24, 2013).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user chriscollins:

When calling getArrayResult() on a query, the result is not being hydrated correctly. Where there should be multiple entities appearing (for a OneToMany association), only the first entity appears in the array.

git bisect suggests this was introduced in 08e38858ed

I've attached a test case with a simplified schema that fails on the above commit, but passes on the commit immediately previous.

If you need any further info, please let me know.

EDIT: PR for failing test case: https://github.com/doctrine/doctrine2/pull/827

Originally created by @doctrinebot on GitHub (Oct 24, 2013). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user chriscollins: When calling `getArrayResult()` on a query, the result is not being hydrated correctly. Where there should be multiple entities appearing (for a OneToMany association), only the first entity appears in the array. git bisect suggests this was introduced in https://github.com/doctrine/doctrine2/commit/08e38858ed36b13b2655f2971308361714798596 I've attached a test case with a simplified schema that fails on the above commit, but passes on the commit immediately previous. If you need any further info, please let me know. EDIT: PR for failing test case: https://github.com/doctrine/doctrine2/pull/827
admin added the Bug label 2026-01-22 14:20:07 +01:00
admin closed this issue 2026-01-22 14:20:07 +01:00
Author
Owner

@doctrinebot commented on GitHub (Oct 25, 2013):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-827] was closed:
https://github.com/doctrine/doctrine2/pull/827

@doctrinebot commented on GitHub (Oct 25, 2013): Comment created by @doctrinebot: A related Github Pull-Request [GH-827] was closed: https://github.com/doctrine/doctrine2/pull/827
Author
Owner

@doctrinebot commented on GitHub (Oct 26, 2013):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-827] was closed:
https://github.com/doctrine/doctrine2/pull/827

@doctrinebot commented on GitHub (Oct 26, 2013): Comment created by @doctrinebot: A related Github Pull-Request [GH-827] was closed: https://github.com/doctrine/doctrine2/pull/827
Author
Owner

@doctrinebot commented on GitHub (Oct 26, 2013):

Comment created by @beberlei:

Fixed

@doctrinebot commented on GitHub (Oct 26, 2013): Comment created by @beberlei: Fixed
Author
Owner

@doctrinebot commented on GitHub (Oct 26, 2013):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Oct 26, 2013): Issue was closed with resolution "Fixed"
Author
Owner

@doctrinebot commented on GitHub (Oct 26, 2013):

Comment created by chriscollins:

Great, thanks for the quick fix :)

@doctrinebot commented on GitHub (Oct 26, 2013): Comment created by chriscollins: Great, thanks for the quick fix :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#3451