currently the default orderBy clause one can specify for models gets added to all queries, including DELETE and UPDATE.
This breaks data-load because it includes in the orderBy the table alias but currently only SELECT queries support aliases.
For example if I have the following schema:
The data-load task does a Doctrine::getTable('Mytable')
>delete()>execute(); to clear the table before loading the fixtures which results in the following SQL:
DELETE FROM mytable ORDER BY m.name ASC
which errors out as the m alias was not defined.
Attached is the patch that makes only SELECT queries get the default orderBy clause from the option.