Hi Qiang,
this is something very strange that made me crazy for about 3 hours
To reproduce it:
-
mysql 5.1.30 and 5.0.77
-
create a table with a field of type enum and declare a value for that enum with the word "joint".
-
create model and crud for the table
-
use both a activeTextField or activeDropDownList (tried both) for the enum field
-
try to save a record (update, create it is the same).
you will see that it will save a blank value. (there isn't any difference if the field can be null or not null, anyway I have it not null and that with a required validator in the model).
I can see in controller just an instruction before (and also after) the save method that in the $model->attribute there is the correct value. But on database…nothing.
Obviously using phpmyadmin i can save correctly the value inside it.
please help me because it is quite important…:-S