[Dbix-class] Extra columns in data for update/create

Christian Lackas lackas at lackas.net
Fri Mar 13 08:56:24 GMT 2009


* Trevor Phillips <trevor.phillips at gmail.com> [090313 03:25]:

Hi Trevor,

> ie; If I transfer all submitted form parameters into a hash called
> %Data, I would then like to simply go:
>   $c->model('DB::OneTable')->create(\%Data);

did you already consider looking at a form builder such as HTML::FormFu
(which nicely integrates into Catalyst)? It does this kind of magic for
you, i.e. also update values behind a relationship (e.g. if a user has
many roles this can all get updated automatically).

See HTML::FormFu::Model and Catalyst::Controller::HTML::FormFu for details.

Christian

-- 
http://www.invicro.com/



More information about the DBIx-Class mailing list