Default value by addCondition('gender', ['M', 'F']);


#1

I’ve found an interesting bug in Agile Toolkit today.

For example

$model->addField('gender')->defaultValue('F');
$model->addCondition('gender',['M','F']);
$model->save();

Would cause an error. The addCondition thought that the array for SQL is a proper value and would set it up as a defaultValue. This would subsequently fail to match the actual condition and produced error on save.

I have committed a fix into 4.3 to address this.