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

Ramprabhu Kaliaperumal ramprabhu.kaliaperumal at oracle.com
Mon Oct 1 10:22:59 GMT 2007


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






More information about the DBIx-Class mailing list