[Dbix-class] with PK::Auto not loaded: insert complains about missing sequence/table name

Matt S Trout dbix-class at trout.me.uk
Sun Nov 25 21:53:56 GMT 2007


On Sun, Nov 25, 2007 at 07:00:35PM +0100, Cedric Boudin wrote:
> I don't want to use sequences or automatic pk generation. I create my
> own specific pk's with a trigger.

Erm, that's a form of automatic pk generation.

DBIC has to be able to get the PK somehow, so either (a) you have to pass it
to ->create, or (b) it has to be grabbable via $storage->last_insert_id.

Otherwise you'd end up with an object with no PK, which would make no sense
at all.

-- 
      Matt S Trout       Catalyst and DBIx::Class consulting and support -
   Technical Director      http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Christmas fun in collectable card game form -
                           http://www.shadowcat.co.uk/resources/2007_trading/



More information about the DBIx-Class mailing list