Affects Version/s: 2.1.3, 2.1.4, 2.1.5
Fix Version/s: None
Security Level: All
Environment:Debian + MySQL + PHP 5.3.3 + Symfony 2.0.8
I'm not sure if i'm in the right place but i'm talking about this : https://github.com/doctrine/doctrine2
The following code trigger a lot more queries than it should and than it used to :
— code —
$qb = $em->createQueryBuilder()
->select('t, c, p')
foreach( $qb->getQuery()->getResult() as $task)
edit: The code doesn't seems to be very nice in this editor, here is a pastbin version : http://pastebin.com/LCRfBCcV
With doctrine 2.1.2, only one query is needed.
Since doctrine 2.1.3, i almost have one query per loop iteration. It's the same with all next versions.
I'm using a NestedSet extension and Symfony 2.0.8, if i force doctrine version to 2.1.2 it works again with one query (with doctrine-common 2.1.4 and doctrine-dbal 2.1.5) so i think the problem is clearly introduced by doctrine itself (2.1.3).
I hope i was clear enough.