i use propel for database interaction. Now i have to create a query like
SELECT data FROM values WHERE a=1 AND (vis=1 or (vis=0 AND userID=5));
I create a propel object from the table "values".
$p = new ValuesQuery()::create
->filterByA(1)
->filterByVis(1)
->_or()
->filterByVis(0)
->filterByUserId(5)
->findOne();
Propel generates the following SQL-Query which mostly makes sense:
SELECT data FROM values WHERE a=1 AND (vis=1 or vis=0) AND userID=5;
How can i fix this? Is it possible to say propel what it should put in brackets?
Thanks for all answers!