On 10/06/11 18:16, Carl Franks wrote:
2011/10/5 Alex Povolotsky<tark...@over.ru>:
Hello!
I'm working on a simple database, minimal extract looks like
create table genre (id serial primary key, genre_name varchar(128) not
null);
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
model_config:
resultset: Genre
constraints:
- Required
and when I enter name on text part of combobox, model->create yields an
error
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?
Hi,
Model::DBIC would definitely need to be patched to explicitly handle ComboBoxes.
I'll try to make the time to work on this - as I think it's a pretty
basic requirement that built-in elements work with Model::DBIC as
expected.
So, nothing right now, yes? Okay, I'll look how to handle it manually.
Alex
_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu