A reply after having a bit sleep.

On Sun, Sep 28, 2008 at 10:00 PM, Daniel Westermann-Clark <[EMAIL PROTECTED]> 
wrote:
> 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.
>

OK - so I am rewording my clause:

RecursiveUpdate does not require that you have additional unique
constraints on tables with auto_increment primary keys like the
original update_or_create does.

Is that acceptable?


-- 
Zbigniew Lukasiak
http://brudnopis.blogspot.com/
http://perlalchemy.blogspot.com/

_______________________________________________
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