I am using the ZF + Doctrine 2.1 implementation by Ralph Schindler (https://github.com/ralphschindler/NOLASnowball/tree/doctrine2-managed-crud).
My MySQL database uses some reserved words, a column named order. I need to tell Doctrine to quote identifiers, but I can’t seem to get it to work in the application itself nor in the scripts/doctrine.php (https://github.com/ralphschindler/NOLASnowball/blob/doctrine2-managed-crud/scripts/doctrine.php) to use the command line tool.
Note: I’m reverse engineering my database by using the command:
php scripts/doctrine.php orm:convert-mapping --from-database annotation library/app/Entity/
which gives the error:
Syntax error or access violation: 1064 You have an error in your SQL
syntax; check the manual that corresponds to your MySQL server version
for the right syntax to use near ‘order’ at line 1
because the column order doesn’t get quoted with ticks.
I have finally found it.
It appears the NOLASnowBall demo app uses an older Doctrine than the current stable. With Doctrine 2.1.4 the ticks are added, without the need to set the extra option.
I have updated Doctrine and took the new Bisna library from Guilherme Blanco’s repository at https://github.com/guilhermeblanco/ZendFramework1-Doctrine2