[DDC-2759] ArrayHydration: Only first entity in OneToMany association is hydrated Created: 24/Oct/13  Updated: 26/Oct/13  Resolved: 26/Oct/13

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: 2.3, Git Master
Fix Version/s: 2.3.5, 2.5, 2.4.1
Security Level: All

Type: Bug Priority: Major
Reporter: Chris Collins Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: hydration, orm
Environment:

Windows, PHP 5.4.17


Attachments: File ArrayHydrationBugTest.php    

 Description   

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



 Comments   
Comment by Doctrine Bot [ 25/Oct/13 ]

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

Comment by Doctrine Bot [ 26/Oct/13 ]

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

Comment by Benjamin Eberlei [ 26/Oct/13 ]

Fixed

Comment by Chris Collins [ 26/Oct/13 ]

Great, thanks for the quick fix

Generated at Fri Oct 31 08:05:59 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.