l3pp4rd/DoctrineExtensions — pull request #209 by Inori (2011-12-23 16:32:42+00:00)
Title: SortableGroup error test case

When removing a entity with Sortable extension that has "JOINED" inheritance doctrine fails with PDOException.

This relates to #197 and when running var_dump code snippet by Ryan I've got these results:

Working results (i.e. even if using "SINGLE_TABLE" inheritance):
.string(144) "UPDATE Sortable\Fixture\Transport\Vehicle n SET n.sortByEngine = n.sortByEngine - :delta WHERE n.sortByEngine >= :start AND n.engine = :group__1"
string(141) "UPDATE Vehicle SET sortByEngine = sortByEngine - ? WHERE (sortByEngine >= ? AND engine_id = ?) AND discriminator IN ('vehicle', 'car', 'bus')"

Not working result ("JOINED" inheritance):
string(144) "UPDATE Sortable\Fixture\Transport\Vehicle n SET n.sortByEngine = n.sortByEngine - :delta WHERE n.sortByEngine >= :start AND n.engine = :group__1"
array(1) {
[0]=>
string(96) "UPDATE Vehicle SET sortByEngine = sortByEngine - ? WHERE (id) IN (SELECT id FROM Vehicle_id_tmp)"
}

As you can see the only real difference is that second query in not working result is wrapped in an array for whatever reason.