[html-formfu] Looking for clarification on ComboBox and Model::DBIC

Alex Povolotsky tarkhil at over.ru
Wed Oct 5 15:09:15 GMT 2011


I'm working on a simple database, minimal extract looks like

create table genre (id serial primary key, genre_name varchar(128) not 

create table shot (id serial primary key, gid int not null references 
genre(id), name varchar(128) not null);

Catalyst has created appropriate model.

Now I want to add new genres automatically with ComboBox. I add to .yml

   - type: ComboBox
     name: genre_name
     label: Genre
       resultset: Genre
       - Required

and when I enter name on text part of combobox, model->create yields an 

  null value in column "gid" violates not-null constraint

What should I do to make HTML::FormFu::Model::DBIC to add new genre and 
appropriate genre id?


More information about the HTML-FormFu mailing list