Hi Jess,
thanks for your precious information, but still ican't figure out how to
do this even if the big picture is clear:
>
> No, if you just make sure you have the primary key set to
> "is_auto_increment" in the add_columns, then copy will automatically
> empty that field for you, and it should work just the same as when you
> use ->create. (If that works, I assuming you are using triggers and
> sequences?)
>
> Jess
1) what do you mean by "empty that field for me" ...? you mean that
DBIx recognizes the "is_auto_increment" attribute so leaving to the
programmer the responsiblity of producing those values?
2) the primary key is multifield and ... I could , but no i don't think
triggers are being used ON BEFORE INSERT to call any sequence, at present
what would you suggest?
I do re-post here the rules for the multi field primary key:
I have some table, lets say TABNAME (n.b. =$table in the Perl
excerpt),
with a multifield primary-key (CENTER,ALTNO,CODPAT):
Rules for subkeys are:
CENTER doesnt change
ALTNOis max(ALTNO) where CENTER = <current CENTER value>
CODPAT s taken form a sequence
thanks again for your fast and detailed help.
Igor
_______________________________________________
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]/