[Catalyst] auto ID

Matt S Trout dbix-class at trout.me.uk
Mon Apr 3 20:55:24 CEST 2006


Will Smith wrote:
> Hi,
>  
> Using the statement:
>  
> myapp::M::CDBI::Cd->create_from_form( $c->form );
>  
> will createa new line in the table Cd with an auto incremental $id. I 
> just wonder is there anyway to get this $id and forward that to another 
> process, right after the new record created.

create_from_form should return the object for the record. See the appropriate 
Class::DBI documentation for more detail

-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Catalyst mailing list