[Dbix-class] info Oracle: executing sql code for sequences or lock

Igor Longagnani i.longagnani at synervis.it
Thu Jan 18 07:28:16 GMT 2007


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



More information about the Dbix-class mailing list