Closed DenysMedvid closed 9 years ago
This only works for MySQL
Ok, thanks you for quick response.
Hi @BuCeFaL
Me again :smile: There should be something like $connection->quoteIdentifier()
, which should (you may guess) quote the identifier according the current connection. I cannot proof the correct method names right now though. I should've written this in the first place, but missed that :no_mouth:
Fix it with quoteIdentifier
this change is weird. the table names are already retrieved using getQuotedTableName
.
I think the issue is that your ORM mapping was not telling the ORM to use a quoted identifier.
Forcing quoting here causes issues in 2 cases:
I think, better solution is left all as was. Anyway it is a very bad idea use reserved keywords in table names. I revert my "force quote".
It should also be reverted here since it is a bug. It causes double-quoting. If you want your table to be escaped, use backtics in table name definition like @ORM\Table(name="
order")
. And in this case, your change quotes it again so it tries to purge using DELETE FROM ""order""
(Postgres example, postgres uses double quotes, not backtics).
Hello.
Fix for sql error if table name is "order"