doctrine/doctrine2 — pull request #359 by splitin2 (2012-05-27 20:36:13+00:00)
Title: Hydrator hotfix - parent object association

Found that using a mixed sql and more than 2 entities the hydrator skips one related association and inserts the third related entity wrongly.

In the case below "c" will be inserted into "a"

SELECT SUM(a.sold) as total, a, b, c FROM Entity\A a LEFT JOIN a.test1 b LEFT JOIN b.test2 c GROUP BY a.id

On a later flush call this will result in ORM\Exception

Found entity of type Entity\A on association Entity\C#test2, but expecting Entity\B