DDC-1221: Fatal Error when building a query using ->add() instead of ->from() #1536

Closed
opened 2026-01-22 13:17:17 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Jun 21, 2011).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user stof:

When creating a query using $qb->add('from', ...) instead of $qb->from(...) a fatal error is thrown when building the DQL query line 989 of the QueryBuilder because this line assumes it has a Doctrine\ORM\Query\Expr\From instance whereas it gets a string.

Note that a similar issue was fixed for $qb->getRootAlias: http://www.doctrine-project.org/jira/browse/DDC-1140

Originally created by @doctrinebot on GitHub (Jun 21, 2011). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user stof: When creating a query using `$qb->add('from', ...)` instead of `$qb->from(...)` a fatal error is thrown when building the DQL query line 989 of the QueryBuilder because this line assumes it has a `Doctrine\ORM\Query\Expr\From` instance whereas it gets a string. Note that a similar issue was fixed for `$qb->getRootAlias`: http://www.doctrine-project.org/jira/browse/[DDC-1140](http://www.doctrine-project.org/jira/browse/DDC-1140)
admin added the Bug label 2026-01-22 13:17:17 +01:00
admin closed this issue 2026-01-22 13:17:18 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jun 21, 2011):

Comment created by stof:

Note that this issue has been introduced by 905e05cd36

@doctrinebot commented on GitHub (Jun 21, 2011): Comment created by stof: Note that this issue has been introduced by https://github.com/doctrine/doctrine2/commit/905e05cd361e9702325e3ea26224b95ac4f7d2e0
Author
Owner

@doctrinebot commented on GitHub (Jun 25, 2011):

Comment created by @beberlei:

This is fixed, thanks for reporting this regression.

@doctrinebot commented on GitHub (Jun 25, 2011): Comment created by @beberlei: This is fixed, thanks for reporting this regression.
Author
Owner

@doctrinebot commented on GitHub (Jun 25, 2011):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Jun 25, 2011): 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#1536