Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Doctrine 2.0 Orx not allowed

Code

$qb->andWhere(
   $qb->expr()->orx(
        $qb->expr()->andx("p.value_a >= " . $values[0],"p.value_a <= " . $values[1]),
        $qb->expr()->orx(
             $qb->expr()->andx("p.venture_min_value_a >= " . $values[0],"p.venture_min_value_a <= " . $values[1]),
             $qb->expr()->andx("p.venture_max_value_a >= " . $values[0],"p.venture_max_value_a <= " . $values[1])
                        )
    ));

Error message:

Expression of type 'Doctrine\ORM\Query\Expr\Orx' not allowed in this context.

Question

orx -> andx -> orx

Is this a doctrine limitation or is it my fault?

like image 411
JoeLoco Avatar asked Oct 08 '22 08:10

JoeLoco


1 Answers

It is a known error and will be fixed in the next Doctrine release (Version 2.2)

like image 81
chiborg Avatar answered Oct 14 '22 10:10

chiborg