Johnny Gebreselassie wrote:
The values for sequence and auto_nextval need to be specified on the primary_key column as shown in this copied documentation:"->add_columns({ id => { sequence => 'mysequence', auto_nextval => 1 } });"Also if I look at the docs for PK::Auto there is a method called sequence, which does something else, I am not quite sure what: http://search.cpan.org/~ribasushi/DBIx-Class-0.08102/lib/DBIx/Class/PK/Auto.pm
Looks like "->sequence($seqname)" is a shortcut for setting the 'sequence' column_info attribute on the column(s) defined by "->set_primary_key(@pkcols)". So if you define the sequence during the call to ->add_columns() (as above), you really don't need to call ->sequence() as well.
Incidentally, I'm wondering if one should also be setting "is_auto_increment => 1" in this situation...
-- Jason Gottshall [email protected] _______________________________________________ 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]
