From 844eff4d497e66ee412b5181cf6a064b88b03438 Mon Sep 17 00:00:00 2001
From: tjc <tjc@ee4ac58c-ac51-4696-9907-e4b3aa274f04>
Date: Tue, 23 Sep 2008 08:30:21 +0000
Subject: [PATCH] add getLazyFeatureNoResiduesById

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@8873 ee4ac58c-ac51-4696-9907-e4b3aa274f04
---
 artemis_sqlmap/Feature.xml             | 24 ++++++++++++++++++++++--
 artemis_sqlmap/FeatureRelationship.xml |  4 ++--
 2 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/artemis_sqlmap/Feature.xml b/artemis_sqlmap/Feature.xml
index 76d0d8768..8d2d04acf 100644
--- a/artemis_sqlmap/Feature.xml
+++ b/artemis_sqlmap/Feature.xml
@@ -54,9 +54,9 @@
 
   <!-- mapping for feature table and lazy loading of feature_dbxref, feature_relationship,
        featureprop, organism tables -->
-  <resultMap id="map-feature-lazy" class="Feature" 
+	
+    <resultMap id="map-feature-lazy-no-residues" class="Feature" 
 	         extends="map-basicfeature">
-    <result property="residues" column="residues" />
     <result property="cvTerm" column="type_id" select="getCvtermByCvTermId" />
     <result property="dbXRef" column="dbXRefId"
                               select="getDbXRefByDbXRefId" />
@@ -76,6 +76,11 @@
 			                           select="getFeatureCvTermsByFeature"/>                         
     <result property="organism" column="{organismId=organismId}" 
                                 select="getOrganism" />
+  </resultMap>	
+	
+  <resultMap id="map-feature-lazy" class="Feature" 
+	         extends="map-feature-lazy-no-residues">
+    <result property="residues" column="residues" />
   </resultMap>
 	
 	
@@ -246,6 +251,21 @@
   </select>
 	
 
+  <select id="getLazyFeatureNoResiduesById" resultMap ="map-feature-lazy-no-residues" >
+	SELECT
+	  timelastmodified,
+	  f.feature_id AS id,
+	  uniquename,
+	  organism_id AS organismId,
+	  f.is_obsolete AS obsolete,
+	  f.name AS feature_name,
+	  f.type_id,
+	  f.dbxref_id AS dbXRefId,
+	  f.seqlen
+	FROM feature f
+    WHERE f.feature_id=$featureId$
+  </select>
+	
   <select id="getLazyFeatureById" resultMap ="map-feature-lazy" >
 	SELECT
 	  timelastmodified,
diff --git a/artemis_sqlmap/FeatureRelationship.xml b/artemis_sqlmap/FeatureRelationship.xml
index b30544a5e..ebc4ecd39 100644
--- a/artemis_sqlmap/FeatureRelationship.xml
+++ b/artemis_sqlmap/FeatureRelationship.xml
@@ -40,9 +40,9 @@
     <resultMap id="select-relationship" class="FeatureRelationship">
 		<result property="featureRelationshipId" column="feature_relationship_id"/>
         <result property="featureBySubjectId" column="subject_id" 
-			                                  select="getLazyFeatureById" />
+			                                  select="getLazyFeatureNoResiduesById" />
         <result property="featureByObjectId"  column="object_id"
-			                                  select="getLazyFeatureById" />
+			                                  select="getLazyFeatureNoResiduesById" />
         <result property="value" column="value" />
         <result property="rank" column="rank" />
         <result property="cvTerm" column="type_id" select="getCvtermByCvTermId" />
-- 
GitLab