Analyzing the problem a bit more, I found out that, in generic terms,
find_or_new({ pk_col => undef })
creates an internal row, and that the successive insert fails to substitute
the pk_col with a value from the sequence, probably because the value has
been explicitly set.
I'm not sure whether this is a bug or 'as designed'.
Certainly, I can work around this in my application by creating a different
path in my code depending on whether I have already a value for my PK
specified or not. But at least one use case for find_or_new &
update_or_insert, i.e. being able to share the same code in a web application
both for creation and editing an entry, is not really possible.
thank you for your attention.
-- patrick
_______________________________________________
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]