On 2008-09-28 17:17:33 +0200, Zbigniew Lukasiak wrote:
> update_or_create relies on find - if you don't pass the PK - then
> find will issue an unrestricted search and return a random row (and
> issue the warning), then that random row will be updated, create
> will never be called.  This is assuming you add { key => primary} -
> if you don't do that then find will fall back to the old behaviour
> and also return a random row.

That's also assuming you don't have any other unique constraints
defined. At least, that's how it was designed.

-- 
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