diff --git a/uk/ac/sanger/artemis/chado/ChadoFeatureLoc.java b/uk/ac/sanger/artemis/chado/ChadoFeatureLoc.java
index 792e680286013139d304da05493534e2e9c08f9a..d2ec985e0a99efc7cc4a107f19059ade0bcfcd51 100644
--- a/uk/ac/sanger/artemis/chado/ChadoFeatureLoc.java
+++ b/uk/ac/sanger/artemis/chado/ChadoFeatureLoc.java
@@ -24,11 +24,13 @@
 
 package uk.ac.sanger.artemis.chado;
 
+/**
+ * Representation of featureloc table.
+ */
 public class ChadoFeatureLoc
 {
   /** id of the parent feature */
   private int srcfeature_id;
-  
   /** start position */
   private int fmin;
   /** end position */
diff --git a/uk/ac/sanger/artemis/chado/ChadoFeatureProp.java b/uk/ac/sanger/artemis/chado/ChadoFeatureProp.java
index de7b507753a8167bead1e34d1d96fbfe4b6c320a..6b998ad6cace9ef35ea29b6235311a4d43e96b6d 100644
--- a/uk/ac/sanger/artemis/chado/ChadoFeatureProp.java
+++ b/uk/ac/sanger/artemis/chado/ChadoFeatureProp.java
@@ -24,6 +24,9 @@
 
 package uk.ac.sanger.artemis.chado;
 
+/**
+ * Representation of featureprop table.
+ */
 public class ChadoFeatureProp
 {
   
@@ -67,11 +70,25 @@ public class ChadoFeatureProp
     this.value = value;
   }
   
+  /**
+   * Any feature can have multiple values for any particular property type - 
+   * these are ordered in a list using rank, counting from zero. For 
+   * properties that are single-valued rather than multi-valued, the 
+   * default 0 value should be used.
+   * @return
+   */
   public int getRank()
   {
     return rank;
   }
 
+  /**
+   * Any feature can have multiple values for any particular property type - 
+   * these are ordered in a list using rank, counting from zero. For 
+   * properties that are single-valued rather than multi-valued, the 
+   * default 0 value should be used.
+   * @param rank
+   */
   public void setRank(int rank)
   {
     this.rank = rank;
diff --git a/uk/ac/sanger/artemis/chado/ChadoFeatureRelationship.java b/uk/ac/sanger/artemis/chado/ChadoFeatureRelationship.java
index 520ecb0c990aac7c9c4c9882fa09b2e201cc8ca0..a532d8f5c04376208c6de94f81d4cca267c3ff39 100644
--- a/uk/ac/sanger/artemis/chado/ChadoFeatureRelationship.java
+++ b/uk/ac/sanger/artemis/chado/ChadoFeatureRelationship.java
@@ -24,6 +24,9 @@
 
 package uk.ac.sanger.artemis.chado;
 
+/**
+ * Representation of feature_relationship table.
+ */
 public class ChadoFeatureRelationship
 {
   
@@ -37,11 +40,21 @@ public class ChadoFeatureRelationship
   /** ordering of subject features */
   public int rank;
   
+  /**
+   * Get the cv term for the relationship type between 
+   * subject and object (e.g. part_of).
+   * @return cvterm
+   */
   public Cvterm getCvterm()
   {
     return cvterm;
   }
   
+  /**
+   * Set the cv term for the relationship type between 
+   * subject and object (e.g. part_of).
+   * @param cvterm
+   */
   public void setCvterm(Cvterm cvterm)
   {
     this.cvterm = cvterm;
@@ -65,11 +78,25 @@ public class ChadoFeatureRelationship
     this.object_id = object_id;
   }
   
+  /**
+   * The ordering of subject features with respect to the object
+   * feature may be important (for example, exon ordering on a transcript
+   *  - not always derivable if you take trans spliced genes into consideration). 
+   *  rank is used to order these; starts from zero.
+   * @return rank the rank
+   */
   public int getRank()
   {
     return rank;
   }
   
+  /**
+   * The ordering of subject features with respect to the object
+   * feature may be important (for example, exon ordering on a transcript
+   *  - not always derivable if you take trans spliced genes into consideration). 
+   *  rank is used to order these; starts from zero.
+   * @param rank
+   */
   public void setRank(int rank)
   {
     this.rank = rank;
@@ -85,11 +112,19 @@ public class ChadoFeatureRelationship
     this.subject_id = subject_id;
   }
   
+  /**
+   * Additional notes/comments
+   * @return
+   */
   public String getValue()
   {
     return value;
   }
   
+  /**
+   * Additional notes/comments
+   * @param value
+   */
   public void setValue(String value)
   {
     this.value = value;
diff --git a/uk/ac/sanger/artemis/chado/ChadoOrganism.java b/uk/ac/sanger/artemis/chado/ChadoOrganism.java
index aeb13d9f533e7e6cd3e1294e0c042b5cfdae587b..328d245d386f5f19cad3ec95a70418639f8f52bb 100644
--- a/uk/ac/sanger/artemis/chado/ChadoOrganism.java
+++ b/uk/ac/sanger/artemis/chado/ChadoOrganism.java
@@ -95,7 +95,7 @@ public class ChadoOrganism
     return comment;
   }
 
-  public void setComment()
+  public void setComment(String comment)
   {
     this.comment = comment;
   }
diff --git a/uk/ac/sanger/artemis/chado/JdbcDAO.java b/uk/ac/sanger/artemis/chado/JdbcDAO.java
index bb48bab2b5b6d23faa4570c1bc5ffce53af2a8bf..516008823e89cc4e1d99222f0a96875976c0f5b6 100644
--- a/uk/ac/sanger/artemis/chado/JdbcDAO.java
+++ b/uk/ac/sanger/artemis/chado/JdbcDAO.java
@@ -171,7 +171,8 @@ public class JdbcDAO
 
     String sql = "SELECT timelastmodified, f.feature_id, object_id,"
                + " fl.strand, fmin, fmax, uniquename, f.type_id,"
-               + " fp.type_id AS prop_type_id, fp.value, fl.phase"
+               + " fp.type_id AS prop_type_id, fp.value, fl.phase,"
+               + " f.organism_id, abbreviation, genus, species, common_name, comment"
                + " FROM  "     + schema + ".feature f"
                + " LEFT JOIN " + schema + ".feature_relationship fr ON "
                                         + "fr.subject_id=" + "f.feature_id"
@@ -179,8 +180,10 @@ public class JdbcDAO
                                         + "fp.feature_id=" + "f.feature_id"
                + " LEFT JOIN " + schema + ".featureloc fl ON "
                                         + "f.feature_id=" + "fl.feature_id"
+               + " LEFT JOIN organism ON organism.organism_id=f.organism_id"                                
                + " WHERE ";
     
+    
     if(uniquename != null)
       sql = sql + "uniquename LIKE '" + uniquename +"'";
     
@@ -213,6 +216,7 @@ public class JdbcDAO
       feature.setCvterm(new Cvterm());
       feature.getCvterm().setId( rs.getLong("type_id") );
       
+      // feature properties
       ChadoFeatureProp featureprop = new ChadoFeatureProp();
       Cvterm cvterm = new Cvterm();
       cvterm.setId(rs.getLong("prop_type_id"));
@@ -226,10 +230,21 @@ public class JdbcDAO
       feature.setTimelastmodified( rs.getTimestamp("timelastmodified") );
       feature.setId( rs.getInt("feature_id") );
       
+      // feature relationship
       ChadoFeatureRelationship feature_relationship = new ChadoFeatureRelationship();
       feature_relationship.setObject_id( rs.getInt("object_id") );
       feature.setFeature_relationship(feature_relationship);
   
+      // feature organism
+      ChadoOrganism organism = new ChadoOrganism();
+      organism.setAbbreviation(rs.getString("abbreviation"));
+      organism.setComment(rs.getString("comment"));
+      organism.setCommon_name(rs.getString("common_name"));
+      organism.setGenus(rs.getString("genus"));
+      organism.setId(rs.getInt("organism_id"));
+      organism.setSpecies(rs.getString("species"));
+      feature.setOrganism(organism);
+      
       list.add(feature);
     }
     // merge same features in the list
@@ -494,7 +509,7 @@ public class JdbcDAO
                  "LEFT JOIN cvterm ON s.type_id=cvterm_id";
     
     if(uniquename != null)
-      sql = sql + "WHERE uniquename='"+uniquename+"'";
+      sql = sql + " WHERE uniquename='"+uniquename+"'";
     
     appendToLogFile(sql, sqlLog);
     Statement st = conn.createStatement();
diff --git a/uk/ac/sanger/artemis/util/DatabaseDocument.java b/uk/ac/sanger/artemis/util/DatabaseDocument.java
index dd3de5b68fc8c3e0a7d077719284364b62ac6117..cb7fa71ca1a4f9a2b150518315c61f1e084c8547 100644
--- a/uk/ac/sanger/artemis/util/DatabaseDocument.java
+++ b/uk/ac/sanger/artemis/util/DatabaseDocument.java
@@ -27,6 +27,7 @@ package uk.ac.sanger.artemis.util;
 import com.ibatis.sqlmap.client.SqlMapClient;
 import uk.ac.sanger.artemis.io.GFFStreamFeature;
 import uk.ac.sanger.artemis.chado.*;
+import uk.ac.sanger.artemis.components.DatabaseEntrySource;
 
 
 import java.sql.*;
@@ -916,14 +917,19 @@ public class DatabaseDocument extends Document
   {
     try
     {
-      DbSqlConfig.init(new JPasswordField());
-      SqlMapClient sqlMap = DbSqlConfig.getSqlMapInstance();
-
-      ChadoFeature feature = new ChadoFeature();
-      feature.setUniquename(args[0]);
-      feature.setSchema(args[1]);
-
-      List featureList = sqlMap.queryForList("getFeature", feature);
+      ChadoDAO dao;
+      DatabaseEntrySource src = new DatabaseEntrySource();
+      src.setLocation(true);
+      
+      if(System.getProperty("ibatis") == null)
+        dao = new JdbcDAO(src.getLocation(), src.getPfield()); 
+      else
+        dao = new IBatisDAO(src.getPfield());
+      
+      ChadoFeature feature;
+      List schemas = new Vector();
+      schemas.add(args[1]);
+      List featureList = dao.getFeature(args[0], schemas); 
       System.out.println("FINISHED getFeature()");
       for(int i = 0; i < featureList.size(); i++)
       {
@@ -947,5 +953,10 @@ public class DatabaseDocument extends Document
     {
       sqle.printStackTrace();
     }
+    catch(ConnectException e)
+    {
+      // TODO Auto-generated catch block
+      e.printStackTrace();
+    }
   }
 }