chentepixtol/QueryBuilder — Issue #1: Bug, setOr al inicio de un query
Author: chentepixtol
Created: 2011-11-10 18:54:24+00:00
State: open

Si realizas lo siguiente

Query::create()
->from('table1')
->where()
->setAND()
->setOR()
->add('field1', 1)
->add('field2', 2)
->end()
->add('field3', 3)
->end();

Genera la siguiente clausula WHERE

( `field1` = 1 OR `field2` = 2 OR `field3` = 3 )

cuando deberia de ser

( `field1` = 1 OR `field2` = 2 AND `field3` = 3 )