mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Doctrine is not Auto-Escaping Columns #5150
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 @alexgurrola on GitHub (Jun 14, 2016).
Originally assigned to: @Ocramius on GitHub.
We have an entity with the column 'limit', but this is a reserved keyword in MySQL. Logically, Doctrine ORM should be Auto-Escaping these Columns, but it's stuck in this ideology that we must escape them in the Column name.
According to Issue #2409, we tried the following workaround.
This does work for our current situation, but this is a very fragile train of logic and Doctrine ORM should be providing this level of safety, regardless of whether it is a reserved keyword or not.
@phansys commented on GitHub (Jun 14, 2016):
See #2409.
@Ocramius commented on GitHub (Jun 15, 2016):
This is a well known limitation documented at http://doctrine-orm.readthedocs.io/projects/doctrine-orm/en/latest/reference/limitations-and-known-issues.html#identifier-quoting-and-legacy-databases
We will change this for Doctrine 3.x, but for 2.x, auto-quoting of identifiers is a no-go, mostly because of case sensitivity issues.
Please note that this doesn't cause security issues per se, as mappings are not user input, but static application information.
@alexgurrola commented on GitHub (Jun 20, 2016):
@Ocramius Understood. Since this is the case, is there a way to check out Doctrine 3.x? All of my searching has turned up null.
@Ocramius commented on GitHub (Jun 20, 2016):
Check the
developbranch@Ocramius commented on GitHub (Oct 19, 2017):
@richRemer you know that we still get email notifications, even if you delete messages, right?
@richRemer commented on GitHub (Oct 19, 2017):
I assumed so. I deleted it because I realized I misunderstood your Doctrine
Beta 3 release notes from 2010 to be Doctrine 3 Beta. Leaving it up there
served no purpose.
The new release could really use some SEO. I could not find any roadmap for
release, so the promise for a fix in v3 is not useful.
On Oct 19, 2017 8:31 AM, "Marco Pivetta" notifications@github.com wrote:
@acataluddi commented on GitHub (May 29, 2018):
Hi, is there any way to escape reserved words in XML metatdata? Putting
`reserved`works but breaks the XSD validation.Thanks,
Adriano
@ToonSpinISAAC commented on GitHub (Sep 3, 2019):
The documentation page mention seems to have been moved here.
@GitFoxDev commented on GitHub (Apr 9, 2024):
Doctrine 3.1. The problem is relevant.