On 2009-02-17 17:15:05 +0100, Zbigniew Lukasiak wrote:
> > So what I should I pass to 'id', nothing?
> 
> Yeah - this is the problem.  The official answer is that you should
> not use find_or_create on tables with auto-increment pks - you should
> use 'create' or 'find' as appriopriate instead.

No, the official answer is not to pass a value for a column that you
want the database to fill.  undef means null in other places to DBIC;
why should find_or_create be different?

find_or_create and friends work fine on tables with auto-increment
keys.  I use it all the time.

-- 
Daniel Westermann-Clark

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to