Subject: | Bug in DBIx::Class::ResultSet populate method |
Hello!
I have found a bug in populate method of DBIx::Class::ResultSet class.
In the section:
## do the has_many relationships
my $parent = $self->find(map {{$_=>$item->{$_}} } @pks)
|| $self->throw_exception('Cannot find the relating object.');
If I have multi-column primary key I get list of hashs instead of one
hash from <map {{$_=>$item->{$_}} } @pks> expression and warning
message "DBIx::Class::Schema::populate(): Query returned more than one
row. SQL that returns multiple rows is DEPRECATED for ->find and -
Show quoted text
>single at ..."
The right expression is {map {$_=>$item->{$_}} @pks}