JoeLoco
JoeLoco

Reputation: 2204

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?

Upvotes: 5

Views: 2983

Answers (1)

chiborg
chiborg

Reputation: 28094

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

Upvotes: 4

Related Questions