DDC-1255: Can't add instance of Andx to QueryBuilder through andWhere #1579

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

Originally created by @doctrinebot on GitHub (Jul 6, 2011).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user ishenkoyv:

$this->_query->andWhere($where) thows the \InvalidArgumentException("Expression of type '$class' not allowed in this context.") at ORM/Query/Expr/Base.php : 64 as $_allowedClasses of ORM/Query/Expr/Andx.php doesn't contains Doctrine\ORM\Query\Expr\Andx

$this->_query instance of Doctrine\ORM\QueryBuilder
$where instance of Doctrine\ORM\Query\Expr\Andx
(string) $where - string '(network_hard_node_hdd.size >= '500') AND (network_hard_node_hdd.size <= '3400')' (length=80)

Originally created by @doctrinebot on GitHub (Jul 6, 2011). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user ishenkoyv: $this->_query->andWhere($where) thows the \InvalidArgumentException("Expression of type '$class' not allowed in this context.") at ORM/Query/Expr/Base.php : 64 as $_allowedClasses of ORM/Query/Expr/Andx.php doesn't contains Doctrine\ORM\Query\Expr\Andx $this->_query instance of Doctrine\ORM\QueryBuilder $where instance of Doctrine\ORM\Query\Expr\Andx (string) $where - string '(network_hard_node_hdd.size >= '500') AND (network_hard_node_hdd.size <= '3400')' (length=80)
admin added the Bug label 2026-01-22 13:18:46 +01:00
admin closed this issue 2026-01-22 13:18:47 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jul 6, 2011):

@doctrinebot commented on GitHub (Jul 6, 2011): - duplicates [DDC-1260: Enable nesting of OR and AND statements in DQL queries](http://www.doctrine-project.org/jira/browse/DDC-1260)
Author
Owner

@doctrinebot commented on GitHub (Jul 12, 2011):

Comment created by @beberlei:

Duplicate of DDC-1260

@doctrinebot commented on GitHub (Jul 12, 2011): Comment created by @beberlei: Duplicate of [DDC-1260](http://www.doctrine-project.org/jira/browse/DDC-1260)
Author
Owner

@doctrinebot commented on GitHub (Jul 12, 2011):

Issue was closed with resolution "Duplicate"

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

No dependencies set.

Reference: doctrine/archived-orm#1579