From: Jonathan C. <cra...@pc...> - 2003-05-29 14:07:53
|
Michael- MICHAEL LUCHTAN wrote: > My first thought was to add an entry to the sres.externaldatabase table > like so: > insert into Sres.Externaldatabase > values(95,'medline','medline',SYSDATE,1,1,1,1,1,0,6,3,2,1); > But even after doing so I get the same error. > > Does anyone have any ideas? My guess is that you also need to add an entry to the ExternalDatabaseRelease table, since (as of version 3.0) GUS has split its representation of external databases into two tables: ExternalDatabase and ExternalDatabaseRelease. The plugin has been updated accordingly, however, the error messages (and comments) still refer to the old schema (which only has the ExternalDatabase table). Here's the relevant part of the code. Line 414 is the "die" statement, obviously: ># Return the external_db_id of an ExternalDatabase given its name. ># >sub getExtDbRelId { > my($extDbRels, $name) = @_; > > $name =~ tr/A-Z/a-z/; # Normalize to lowercase > > my $db = $extDbRels->{$name}; > my $relId = $db->{'external_database_release_id'} if defined($db); > > die "Unable to find ID for ExternalDatabase $name" if (not defined($relId)); > return $relId; >} I've updated the plugin in CVS to make the comment and error message a little more accurate. Looking quickly at the rest of the code, it appears that the "getExtDbRelId" will always return the most recent ExternalDatabaseRelease (or, rather, its primary key value) for a given ExternalDatabase.name, based on ExternalDatabaseRelease.release_date. This is ever-so-slightly dangerous, because the release_date is nullable, but should not be an issue so long as you specify one that's non-null. Jonathan |