mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Doctrine aliasing issue when column name starts with number #6033
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 @CheeseBites on GitHub (Aug 7, 2018).
Originally assigned to: @Ocramius on GitHub.
If the column name starts with a number the querybuilder doesn't wrap the alias in quotes,
Error returns:
An exception occurred while executing 'SELECT t0_.AA AS AA_0, t0_.BB AS BB_1, t0_.[12AA] AS 12AA_2 FROM [foo]'What the query should look like
An exception occurred while executing 'SELECT t0_.AA AS AA_0, t0_.BB AS BB_1, t0_.[12AA] AS "12AA_2" FROM [foo]'The code looks like this
Is there any workaround for this?
@Ocramius commented on GitHub (Aug 7, 2018):
What ORM version are you on? I think this is already fixed by prefixing without numbers as start
@ostrolucky commented on GitHub (Aug 7, 2018):
Dupe of https://github.com/doctrine/doctrine2/issues/6965
@Ocramius commented on GitHub (Aug 7, 2018):
Closing as per @ostrolucky's findings