[html-formfu] Model::DBIC: additive mode for many_to_many and multi select fields

Moritz Onken onken at houseofdesign.de
Sun May 10 11:15:26 GMT 2009


Hi Carl,

attached is a patch which adds support for "add_to_$rel" instead of  
"set_$rel" for many_to_many relationships and select-like fields.

The reason for this is that I want to create a form, where the user  
can choose a single element from a select box. This element should  
then be added to the m2m relationship. The current implementation did  
not allow this (I think :-) ).

And I found a minor inconsistency. If model_config is set model::dbic  
sets the default resultset to ucfirst $name. This is only done if  
stash->{schema} is set, not in a catalyst environment. Patch is  
included.

Hope you like it :-)

cheers,

moritz


-------------- next part --------------
A non-text attachment was scrubbed...
Name: select_additive.patch
Type: application/octet-stream
Size: 6465 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/html-formfu/attachments/20090510/3a8fe7b9/select_additive.obj
-------------- next part --------------



More information about the HTML-FormFu mailing list