DDC-2435: Column name with number and reserved character creates invalid query #3057

Closed
opened 2026-01-22 14:10:58 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (May 8, 2013).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user dane77hz:

I have a column name called 1:1 which i map like so
@Column(type="string", name="1:1")
Unfortunately, the SQL that get generated does not work in mysql:
SELECT t0.1:1 AS 112 FROM table t0
the problem is with the 'AS 112', if it contained a letter eg. 11a, or was escaped eg. 112 it wound work.

Originally created by @doctrinebot on GitHub (May 8, 2013). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user dane77hz: I have a column name called 1:1 which i map like so @Column(type="string", name="`1:1`") Unfortunately, the SQL that get generated does not work in mysql: SELECT t0.`1:1` AS 112 FROM `table` t0 the problem is with the 'AS 112', if it contained a letter eg. 11a, or was escaped eg. `112` it wound work.
admin added the Bug label 2026-01-22 14:10:58 +01:00
admin closed this issue 2026-01-22 14:10:58 +01:00
Author
Owner

@doctrinebot commented on GitHub (May 17, 2013):

Comment created by @FabioBatSilva:

Fixed : c9d9b68fa9

@doctrinebot commented on GitHub (May 17, 2013): Comment created by @FabioBatSilva: Fixed : https://github.com/doctrine/doctrine2/commit/c9d9b68fa9937218aad05dfca4b3f96b409cfc8e
Author
Owner

@doctrinebot commented on GitHub (May 17, 2013):

Issue was closed with resolution "Fixed"

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

No dependencies set.

Reference: doctrine/archived-orm#3057