Criteria with boolean=true don't works

I have the next in my model->search():


When I put to true (I want restrict the elements in the search with has the field to true), it works, but when I do the same changing to


All elements in the bd, are retrieved.

Any Ideas?

Thank you!



    'someBooleanField' => false,



$criteria->compare('someBooleanField', 0);

CDbCriteria::compare() converts the value to string, and returns without modifying the condition when string is empty. Boolean true is converted to string "1" so it works, but false is converted to empty string.

Ok, thanks a lot!