Subject: | HTML::FormFu::Constraint::DBIC::Unique issue while method_name and others arguments are together |
Date: | Mon, 2 Jan 2017 14:29:06 +0100 |
To: | bug-HTML-FormFu-Model-DBIC [...] rt.cpan.org |
From: | Martin Spevak <martin.spevak [...] hpe.com> |
Hi,
I am using your HTML::FormFu::Constraint::DBIC::Unique to identify
unique value in database. Because of design of database I have to join 3
tables to get this information. So right way is to use method_name. This
works fine, but I need one more information what is included in form
data. But argument others doesn't work while I am using argument
method_name.
I suggest to add this parameter similar like this (or some better way :-):
78c78,95
< return $resultset->$method_name( $value, $pk_val );
---
Show quoted text
> my %others;
> if ( $self->others ) {
> my @others = ref $self->others ? @{ $self->others }
> : $self->others;
>
> my $params = $self->form->input;
>
> %others =
> grep {
> defined && length
> }
> map {
> $_ => $self->get_nested_hash_value( $params, $_ )
> } @others;
>
> }
>
> return $resultset->$method_name( $value, $pk_val, others =>
\%others );
Best regards,
Martin Spevak
--
*Martin (singer) Spevak*
HPES Software Development Engineer
HPES Network Management Solutions
Location: Galvaniho 7/A, Bratislava, Slovakia
Tel.: +421 2 5752 5390
Email: martin.spevak@hpe.com
Message body not shown because it is not plain text.