[DC-322] Data dump fails on tables with quoted identifiers Created: 03/Dec/09 Updated: 04/Dec/09
|Reporter:||Massimiliano Torromeo||Assignee:||Jonathan H. Wage|
linux, apache 2, mysql 5.1, php 5.2
While dumping a table with a quoted identifier `numeric`, doctrine failed because the constructed query had an invalid alias the field: c__`numeric`.
I know that using quoted identifiers is discouraged but I think this could be easily solvable.
|Comment by Juozas Kaziukenas [ 03/Dec/09 ]|
In which code part are you quoting that column? Because just enabling identifiers quoting would result in completely different results (at least there will be all columns quotes or none).
|Comment by Massimiliano Torromeo [ 04/Dec/09 ]|
I'm not using Doctrine::ATTR_QUOTE_IDENTIFIER, I generated a yaml from a preexisting db and then adapted it.
It generated the following definition:
but it was with an old version of Doctrine and this is not the case anymore (I tried regenerating it). I assumed it was correct to quote one single identifier, but I now guess it wasn't.
I think this can be closed as NotBug.
Sorry for the trouble.
|Comment by Juozas Kaziukenas [ 04/Dec/09 ]|
However, variables cannot be quoted like that - quoting happens after actual columns are constructed, so now Doctrine needs to unquote it and do it's stuff. If you want quoting - enable that option and it will do it for you, or the best - don't use reserved words in your schema
This issue can be closed as Invalid.