mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Doctrine 3: Auto-escape column names #5852
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 @weaverryan on GitHub (Jan 23, 2018).
Hi guys!
In #5874, Ocramius mentioned that the auto-escaping of column names for reserved keywords couldn't happen for Doctrine 2, but it could happen in Doctrine 3. I couldn't find any issue in the Doctrine 3 milestone, so I wanted to make sure the idea didn't get lost: I just saw a beginner hit this and get confused today (so 3.0 is our chance).
Is this still a "go" (i.e. yes, something we at least can do, assuming someone does the work) for Doctrine 3?
Thanks!
@Ocramius commented on GitHub (Jan 23, 2018):
Yeah, I think this should happen for 3.x.
We will have bugs with people doing mixed windows/mac/linux deployments, but less problems with reserved keywords used in mappings, and we can also get rid of the awkward "quoting in mappings" syntax.
@ostrolucky commented on GitHub (Aug 7, 2018):
This already happened in master
@PowerKiKi commented on GitHub (Jun 7, 2019):
This has been implemented in
08e2f779e3(and following commits) and the issue should closed.@GregOriol commented on GitHub (Jan 17, 2025):
I'm maybe missing something but with a column definition as
#[Column(type: Types::BOOLEAN, name: 'manual')and MySQL 8.4 which has "manual" as reserved keyword, an INSERT request made through the ORM fails on the word. It works by escaping it in the name definition, but shouldn't it be automatic since it belongs to the known reserved keywords?