diff --git a/modules/Bio/EnsEMBL/DBSQL/BaseAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/BaseAdaptor.pm index 32963fbec28445bd3d81aabaa95ac6a2954bca9d..69e2766cfa2d993d9e35c6480e096a4a8ffababb 100755 --- a/modules/Bio/EnsEMBL/DBSQL/BaseAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/BaseAdaptor.pm @@ -119,7 +119,11 @@ sub new { if( !defined $dbobj || !ref $dbobj ) { throw("Don't have a db [$dbobj] for new adaptor"); } - if( ref($dbobj) =~ /DBAdaptor$/){ + if($dbobj->isa('Bio::EnsEMBL::DBSQL::DBAdaptor')){ + $self->db($dbobj); + $self->dbc($dbobj->dbc); + } + elsif( ref($dbobj) =~ /DBAdaptor$/){ $self->db($dbobj); $self->dbc($dbobj->dbc); }