[Dbix-class] How to do 'find' for comibinational primary key

Ash Berlin ash_cpan at firemirror.com
Mon Oct 1 10:36:54 GMT 2007


Ramprabhu Kaliaperumal wrote:
> Hi
> 
> I have a table with combinational primary key like below
> 
> __PACKAGE__->set_primary_key(qw(sent_at sender receiver subject message));
> 
> 
> When I do find I am not getting the row object.
> Following is my code...
> 
>     my $hash = {
>       sent_at     => $sent_at,
>       sender      => $sender,
>       receiver    => $receiver,
>       subject     => $subject,
>       message     => $message
>     };
> 
>     my $log = $schema->resultset('NotificationLog')->single($hash);
> 
> Please let me know how to do find for combinational primary key?
> 
> Thanks & Regards
> -Ran
> 

Have you tried ->find ?



More information about the DBIx-Class mailing list