From eb33957c858e7591caf30304adbbac40e2d51a68 Mon Sep 17 00:00:00 2001
From: Glenn Proctor <gp1@sanger.ac.uk>
Date: Fri, 23 Sep 2005 08:51:37 +0000
Subject: [PATCH] Initialise adaptor in generic_fetch

---
 .../Bio/EnsEMBL/DBSQL/RegulatoryFactorAdaptor.pm    | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/modules/Bio/EnsEMBL/DBSQL/RegulatoryFactorAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/RegulatoryFactorAdaptor.pm
index 1122f7c7a7..348da5966d 100644
--- a/modules/Bio/EnsEMBL/DBSQL/RegulatoryFactorAdaptor.pm
+++ b/modules/Bio/EnsEMBL/DBSQL/RegulatoryFactorAdaptor.pm
@@ -1,5 +1,5 @@
 #
-# EnsEMBL module for Bio::EnsEMBL::DBSQL::RegulatoryMotifAdaptor
+# EnsEMBL module for Bio::EnsEMBL::DBSQL::RegulatoryFactorAdaptor
 #
 # Copyright EMBL/EBI
 #
@@ -15,9 +15,9 @@ Bio::EnsEMBL::DBSQL::RegulatoryFactorAdaptor
 
 $rma = $database_adaptor->get_RegulatoryFactorAdaptor();
 
-$regulatory_factor = $rma->fetch_by_dbID(132);
-$regulatory_factor = $rma->fetch_by_name('Factor1');
-@regulatory_factors = $rma->fetch_all_by_type("promoter");
+$regulatory_factor = $rfa->fetch_by_dbID(132);
+$regulatory_factor = $rfa->fetch_by_name('Factor1');
+@regulatory_factors = $rfa->fetch_all_by_type("transcription_factor");
 
 $rma->store($rm1, $rm2, $rm3);
 
@@ -149,8 +149,9 @@ sub _generic_fetch {
     my @factors;
     while ($sth->fetch) {
         push @factors, Bio::EnsEMBL::RegulatoryFactor->new(-DBID => $regulatory_factor_id,
-							 -NAME => $name,
-							 -TYPE => $type);
+							   -NAME => $name,
+							   -TYPE => $type,
+							   -ADAPTOR => $self);
       }
     return \@factors;
 }
-- 
GitLab