[html-formfu] Model-DBIC and problem with save_to_model

Andreas Marienborg omega at palle.net
Wed Feb 13 09:24:35 GMT 2008


I have a checkbox in my form, and if I try to check it, I get the  
following from Model-DBIC:

[error] DBIx::Class::Row::update_or_insert(): DBI Exception:  
DBD::Pg::st execute failed: ERROR:  invalid input syntax for type  
boolean: "on"
  [for Statement "UPDATE bookmark SET modified = ?, private = ? WHERE  
( id = ? )" with ParamValues: 1='1202893030', 3='263', 2='on'] at / 
Users/andreas/Projects/opensource/html-formfu-trunk/HTML-FormFu/lib/ 
HTML/FormFu/Model/DBIC.pm line 270

which is as expected I guess.
Setting value: 1 on the checkbox fixes it

We might want to consider special-casing boolean fields and checkboxes?


- andreas




More information about the HTML-FormFu mailing list