From: Jeetendra S. <so...@vb...> - 2005-02-18 17:12:08
|
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. |