Skip Menu |

This queue is for tickets about the HTML-FormFu-Model-DBIC CPAN distribution.

Report information
The Basics
Id: 63229
Status: open
Priority: 0/
Queue: HTML-FormFu-Model-DBIC

People
Owner: Nobody in particular
Requestors: islue [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.08002
Fixed in: (no value)



Subject: search broken without attributes given in _save_multi_value_fields_many_to_many()
I wrote such a config like below: ... model_config: resultset: Table condition_from_stash: relationship.column: column_value attributes: join: relationship ... I use it to display a Select element with conditional options from a table. And it broken in code $form->model->create({'resultset' => 'Table'}); I tried to make a patch and attached it. -- http://islue.blogspot.com/
Subject: patch.diff
--- /usr/lib/perl5/site_perl/5.10/HTML/FormFu/Model/DBIC.pm 2010-09-23 04:40:48.000000000 +0900 +++ lib/HTML/FormFu/Model/DBIC.pm 2010-11-22 19:02:18.627394100 +0900 @@ -870,10 +870,11 @@ # check if there is a restricting condition on here # if so life is more complex my $condition = $config->{'-condition'}; + my $attributes = $config->{'attributes'}; if ($condition) { my $set_method = "add_to_$name"; my $remove_method = "remove_from_$name"; - foreach ( $dbic->$name->search($condition)->all ) { + foreach ( $dbic->$name->search($condition,$attributes)->all ) { $dbic->$remove_method($_); } foreach my $row (@rows) {
Hi, Thanks for the patch, however I'll require tests to be sure it's doing what's expected, before I can apply it. Cheers,