[DBAL-529] databasenames including dashes not correctly supported Created: 24/May/13 Updated: 26/May/13 Resolved: 26/May/13
|Reporter:||Andy Rosslau||Assignee:||Benjamin Eberlei|
|Labels:||annotationdriver, mapping, yml|
I'm having a legacy Database including a dash in its name:
which includes tables I want to work with.
The EntityMapping would be the following:
Both concludes in a Query (SELECT, INSERT etc.) which won't work:
I found a simple fix by trial and Error. Just put a "`" in front of the databasename:
Although this fix works, it feels wrong.
|Comment by Benjamin Eberlei [ 26/May/13 ]|
This is the correct behavior, autoquoting is more painful than helpful, so we don't do it.
The explicit escaping with ` is documented to be the proper fix for quoting.
|Comment by Andy Rosslau [ 26/May/13 ]|
So? I thougt there is any autoquoting, as I recognized a query would look like that, when I put the database name in ` (eg. `my-db`.table).
sample-query (not working)
Thats why I reported this issue. Only a single ` would work.. Query would look like this (correct)
So as you can see the second ` is added automatically.