tqisjim has asked for the wisdom of the Perl Monks concerning the following question:
my @ids = ( 1, 2, 3, 4 ); my $rs = $schema->resultset('records'); my @records = $rs->find( @ids, { key => 'primary' } ); ## Throws the following error: ## !!! DBIx::Class::ResultSet::find(): find() expects ## either a column/value hashref, or a list of values ## corresponding to the columns of the specified unique ## constraint 'primary'
Documentation:
find Arguments: \%columns_values | @pk_values, { key => $unique_constraint, + %attrs }?
Based on the documentation and error message, it seems like my invocation is correct. What am I doing wrong?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: dbix::class find() question
by poj (Abbot) on Jan 18, 2016 at 16:56 UTC | |
|
Re: dbix::class find() question
by Your Mother (Archbishop) on Jan 18, 2016 at 19:12 UTC | |
by tqisjim (Beadle) on Jan 18, 2016 at 19:58 UTC | |
by Mr. Muskrat (Canon) on Jan 18, 2016 at 20:42 UTC | |
by Your Mother (Archbishop) on Jan 18, 2016 at 21:41 UTC | |
by Your Mother (Archbishop) on Jan 18, 2016 at 20:29 UTC |