[Dbix-class] PK::Auto Sequence Definition and Purpose

Johnny Gebreselassie jgebreselassie at capwiz.com
Fri Jun 12 15:48:22 GMT 2009


I am trying to get my head around PK::Auto,  my understanding of what 
the module does - is grab the primary key value from the newly created 
row, if that value was not created by DBIC but rather by the database.  
It then puts the primary key value in the returned row object, is this 
correct?

If so, I'm a little confused as to why the module wants to know what 
sequence was used by the database to create the primary key? 

As a follow up to that, what I would really like to do is have the 
sequence defined in the resultsource be automatically used to create the 
primary key prior to insert, this process being independent of any 
database triggers.  Can somebody point me in the right direction or 
clarify my understanding? 




--

Johnny Gebreselassie



More information about the DBIx-Class mailing list