Affects Version/s: None
Fix Version/s: None
Security Level: All
This issue is created automatically through a Github pull request on behalf of splitin2:
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"
<code>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</code>
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