Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

getting last_insert_id

by palette (Scribe)
on Mar 28, 2007 at 14:18 UTC ( #607029=perlquestion: print w/replies, xml ) Need Help??

palette has asked for the wisdom of the Perl Monks concerning the following question:

I am using DBIx::Class

$self->{schema}->populate('Order', [ [ qw/description subcode creationdate/], [ $element->severity."-".$element->message , + $element->completionCode, $current_date ]]);

I have a sequense for this table which will insert the value in the primary key field of this table ie; order_id.

Now after populating the table I want to get the the value inserted inthe primary key field.

Can anyone suggest what si the easiest way of doing this in DBIx::Class

Replies are listed 'Best First'.
Re: getting last_insert_id
by bobf (Monsignor) on Mar 28, 2007 at 15:02 UTC

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://607029]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2023-05-31 16:50 GMT
Find Nodes?
    Voting Booth?

    No recent polls found