[Dbix-class] stupid ?: how to create new objects & save them?

Matt S Trout dbix-class at trout.me.uk
Sat Apr 1 14:29:36 CEST 2006


Jess Robinson wrote:
> It apppears I was wrong.. ENODWIMMERY.

If you don't want to care whether your object is in the database yet, you can
call ->insert_or_update.

Personally I'd be *really* upset if I called ->update on something and it 
magically got inserted rather than going "scuse me, I'm not in the database yet".

-- 
      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 Dbix-class mailing list