I am interested in understanding autoincrement under DBIx::Class. It appears that it works out-of-the-box for databases which implement autoincrement columns. For databases using sequences in place of autoincrement, it appears that a trigger must be added to the database.
http://search.cpan.org/~bricas/DBIx-Class-0.07003/lib/DBIx/Class/Manual/FAQ.pod#Inserting_and_updating_data For databases which use sequences, there are several possible ways to access the sequence. - set up a trigger in the database - fetch the value from the sequence, then use that value in the insert statement - call the sequence in the insert statement DBIx::Class::PK::Auto relies on the first solution. I have not found an implementation for either of the other solutions. I am wondering if that is because: - triggers are the way to go - no one has needed/wanted to do it without triggers - no one has gotten around to it, but it's a good idea I did find one post discussing PK::Sequence, but it appears to be suffering Warnock's dilemma. http://lists.rawmode.org/pipermail/dbix-class/2006-August/002093.html -kolibrie
signature.asc
Description: Digital signature
_______________________________________________ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ Searchable Archive: http://www.mail-archive.com/[email protected]/
