Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Invalid
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Security Level: All
-
Labels:None
Description
This issue is created automatically through a Github pull request on behalf of splitin2:
Url: https://github.com/doctrine/doctrine2/pull/359
Message:
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
<pre>
Found entity of type Entity\A on association Entity\C#test2, but expecting Entity\B
</pre>