From: Deborah P. <pi...@pc...> - 2005-02-18 17:53:07
|
I believe it inserts into the version table by selecting the row in the nasequenceimp table, therefore you have put the current row in the version table. It needs to version before it inserts or updates. Make sure the dates used are to the second, otherwise you will get a lot of these. We have discussed changing the PK defintion for the version tables because computers can run too fast to avoid this sort of problem at times even if the time is taken to the second. In short, you aren't really versioning anymore and when you rerun this plugin or another to version the same row, you will get the problem you tried to avoid. However, this will happen a lot more. Debbie Jeetendra Soneja wrote: >Hi all > >I am trying to update a genbank sequence using GBParser plugin. While >updating I got an error during versioning, for trying to insert a >duplicate value for the primary key in dotsver.externalnasequencever (i.e. >dotsver.nasequenceimpver) table. > >While debugging I figured out that the primary key for the >dotsver.nasequenceimpver table is the combination of na_sequence_id and >modification_date. However, the order of the statements in GusRow.pm >module is > > $self->version(); > $self->update(); > >Thus, it is trying to version before updating the sequence. That it, it is >inserting a row with identical na_sequence_id and modification_date (using >insert statement with 'select * from dots.externalnasequence') in the >version table. > >When I swapped the order of these statements so that the update statement >executes first, it worked fine. > >Also, one more concern is that the above combination for the primary key >of the verion tables would allow updating a sequence only once for any >date. > >Any suggestions/comments are welcome. > >Thanks, >Jeetendra. > > > >------------------------------------------------------- >SF email is sponsored by - The IT Product Guide >Read honest & candid reviews on hundreds of IT Products from real users. >Discover which products truly live up to the hype. Start reading now. >http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >_______________________________________________ >Gusdev-gusdev mailing list >Gus...@li... >https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev > > |