DDC-760: Column names with MySQL reserved words are not escaped with _`_ #936

Closed
opened 2026-01-22 12:56:06 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Aug 20, 2010).

Jira issue originally created by user aubergine:

I had field name key for column and it generates error after execution because it reserved MySQL word.

In Doctrine\DBAL\Statement::_sql I had this query:

INSERT INTO user_systems (key, created, updated, id_local, id_user, id_system) VALUES (?, ?, ?, ?, ?, ?)

Originally created by @doctrinebot on GitHub (Aug 20, 2010). Jira issue originally created by user aubergine: I had field name `key` for column and it generates error after execution because it reserved MySQL word. In Doctrine\DBAL\Statement::_sql I had this query: INSERT INTO user_systems (key, created, updated, id_local, id_user, id_system) VALUES (?, ?, ?, ?, ?, ?)
admin added the Bug label 2026-01-22 12:56:06 +01:00
admin closed this issue 2026-01-22 12:56:06 +01:00
Author
Owner

@doctrinebot commented on GitHub (Aug 20, 2010):

Comment created by romanb:

There is no automatic escaping. See: http://www.doctrine-project.org/projects/orm/2.0/docs/reference/basic-mapping/en#quoting-reserved-words

@doctrinebot commented on GitHub (Aug 20, 2010): Comment created by romanb: There is no automatic escaping. See: http://www.doctrine-project.org/projects/orm/2.0/docs/reference/basic-mapping/en#quoting-reserved-words
Author
Owner

@doctrinebot commented on GitHub (Aug 20, 2010):

Issue was closed with resolution "Invalid"

@doctrinebot commented on GitHub (Aug 20, 2010): Issue was closed with resolution "Invalid"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#936