mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-3236: Quote table names #4006
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Jul 31, 2014).
Originally assigned to: @ostrolucky on GitHub.
Jira issue originally created by user BenjaminHorn:
Different dbs have different reserved words. I started my project with mysql where i couldnt name my table as "order". After changing to postgre it turned out that "user" is reserved. Although
ALTER TABLE "member" RENAME TO "user";works.
I know i could use prefixes in yml eg
but
-i build my db
-automatically generate my yaml files from it
-then i generate the entities
If i have prefixed table names my entities will have them too.
Besides doctrine is a layer on top of different dbs, it would be nice not to worry about reserved words when i naming my tables.
What is your opinion on this feature.
@doctrinebot commented on GitHub (Jul 31, 2014):
Comment created by @deeky666:
[~BenjaminHorn] this looks more like a DBAL related issue. Can you please give more details how the broken SQL is created by you? Also please provide information about which DBAL and/or ORM version you are referring to as we have fixed a lot of quotation problems with DDL statements in current DBAL master over the last few months. So please also try using the latest master and see if you can reproduce the issue.
If the issue still persists it would be helpfult to know which database vendor and which version you are using (as different vendors and versions have different reserved keywords).
@ostrolucky commented on GitHub (Aug 6, 2018):
In Doctrine 3.x, everything is always quoted