first I would like to prevent that I’m aware of the problem of casting boolean variable when setting to false but I resolve this problem explain in http://www.yiiframework.com/forum/index.php/topic/32334-boolean-type-with-postgresql/ for model and form in general. But here I face to a different situation and I don’t find any answer yet. I rely on you to help me =P
Let’s take an example : I have one model with two fields field A and field B. They are both boolean.
For each field I create a different form Form A allows to set A and form B … B.
I create then different action and scenario in order to set rules like ‘A is unsafe if we’re in scenario B’ and ‘B unsafe if we’re in scenario A’ in order to doesn’t change the other parameter which is not in form.
However when I apply an edition of the record, for A for example, I have an exception because B, as it’s false, is set to void, and postgresql doesn’t take void boolean…
(no Problem if before B has been set to true)
CDbCommand failed to execute the SQL statement: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type boolean: "".
May you help me ?