DDC-1898: Using and selecting Alias ´as´ with query builder throws exception #2393

Closed
opened 2026-01-22 13:51:32 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Jun 28, 2012).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user tridem:

Using and selecting Alias ´as´ with query builder

$qb = $em->createQueryBuilder();
$qb->select('as')
    ->from('Foo', 'as');

throws the following exception:

Message: [Syntax Error] line 0, col 7: Error: Expected IdentificationVariable | ScalarExpression | AggregateExpression | FunctionDeclaration | PartialObjectExpression | "(" Subselect ")" | CaseExpression, got 'as'

Originally created by @doctrinebot on GitHub (Jun 28, 2012). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user tridem: Using and selecting Alias ´as´ with query builder ``` $qb = $em->createQueryBuilder(); $qb->select('as') ->from('Foo', 'as'); ``` throws the following exception: Message: [Syntax Error] line 0, col 7: Error: Expected IdentificationVariable | ScalarExpression | AggregateExpression | FunctionDeclaration | PartialObjectExpression | "(" Subselect ")" | CaseExpression, got 'as'
admin added the Bug label 2026-01-22 13:51:32 +01:00
admin closed this issue 2026-01-22 13:51:33 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jul 5, 2012):

Comment created by @beberlei:

AS is a DQL keyword.

@doctrinebot commented on GitHub (Jul 5, 2012): Comment created by @beberlei: AS is a DQL keyword.
Author
Owner

@doctrinebot commented on GitHub (Jul 5, 2012):

Issue was closed with resolution "Invalid"

@doctrinebot commented on GitHub (Jul 5, 2012): 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#2393