commit fa0bbad1fe4e7bd4435216d654137c74c65b58f9
Author: Andreas Müller <a.mueller@bgbm.org>
Date:   Fri Apr 22 17:11:04 2016 +0200

    Add symbol and reverseSymbol do DefinedTermBase  #5734

diff --git a/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/DefinedTermBase.java b/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/DefinedTermBase.java
index be3128087b..1ed68c85e8 100644
--- a/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/DefinedTermBase.java
+++ b/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/DefinedTermBase.java
@@ -73,7 +73,8 @@ import eu.etaxonomy.cdm.model.occurrence.PreservationMethod;
 @XmlType(name = "DefinedTermBase", propOrder = {
     "media",
     "vocabulary",
-    "idInVocabulary"
+    "idInVocabulary",
+    "symbol"
 })
 @XmlRootElement(name = "DefinedTermBase")
 @XmlSeeAlso({
@@ -169,7 +170,12 @@ public abstract class DefinedTermBase<T extends DefinedTermBase> extends TermBas
 //  @NullOrNotEmpty
     private String idInVocabulary;  //the unique identifier/name this term uses in its given vocabulary #3479
 
-
+    @XmlElement(name = "symbol")
+    @Column(length=10)
+    //the symbol to be used in String representations for this term  #5734
+    //this term can be changed by the database instance even if the term is not managed by this instance as it is only for representation and has no semantic or identifying character
+    //empty string is explicitly allowed and should be distinguished from NULL!
+    private String symbol;
 
 //***************************** CONSTRUCTOR *******************************************/
 
diff --git a/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/RelationshipTermBase.java b/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/RelationshipTermBase.java
index c814fd1937..2075489d34 100644
--- a/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/RelationshipTermBase.java
+++ b/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/RelationshipTermBase.java
@@ -48,7 +48,8 @@ import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
 @XmlType(name = "RelationshipTermBase", propOrder = {
     "symmetric",
     "transitive",
-    "inverseRepresentations"
+    "inverseRepresentations",
+    "reverseSymbol"
 })
 @XmlSeeAlso({
 	HybridRelationshipType.class,
@@ -80,6 +81,13 @@ public abstract class RelationshipTermBase<T extends RelationshipTermBase> exten
 	@IndexedEmbedded(depth = 2)
 	private Set<Representation> inverseRepresentations = new HashSet<Representation>();
 
+    @XmlElement(name = "reverseSymbol")
+    @Column(length=10)
+    //the symbol to be used in String representations for the reverse representation of this term #5734
+    //this term can be changed by the database instance even if the term is not managed by this instance as it is only for representation and has no semantic or identifying character
+    //empty string is explicitly allowed and should be distinguished from NULL!
+    private String reverseSymbol;
+
 //******************** CONSTRUCTOR ************************/
 
     //for JAXB only, TODO needed?
diff --git a/cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v36_40/SchemaUpdater_36_40.java b/cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v36_40/SchemaUpdater_36_40.java
index 759b1623fa..c7c1ca5dd2 100644
--- a/cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v36_40/SchemaUpdater_36_40.java
+++ b/cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v36_40/SchemaUpdater_36_40.java
@@ -108,7 +108,24 @@ public class SchemaUpdater_36_40 extends SchemaUpdaterBase {
         step = ColumnRemover.NewInstance(stepName, tableName, newColumnName, ! INCLUDE_AUDIT);
         stepList.add(step);
 
-        ///#5369
+        //#5734
+        //Add symbol to terms
+        stepName = "Add symbols to terms";
+        tableName = "DefinedTermBase";
+        newColumnName = "symbol";
+        step = ColumnAdder.NewStringInstance(stepName, tableName, newColumnName, 10, INCLUDE_AUDIT);
+        stepList.add(step);
+
+        //Add reverse symbol to terms
+        stepName = "Add reverse symbol to terms";
+        tableName = "DefinedTermBase";
+        newColumnName = "reverseSymbol";
+        step = ColumnAdder.NewStringInstance(stepName, tableName, newColumnName, 10, INCLUDE_AUDIT);
+        stepList.add(step);
+
+        //TODO update existing terms like concept relationship types or presenceAbsenceTerms
+
+        //#5369
         renameColumnsAccordingToHibernate5(stepList);
 
 
diff --git a/cdmlib-test/src/main/resources/dbscripts/001-cdm.h2.sql b/cdmlib-test/src/main/resources/dbscripts/001-cdm.h2.sql
index 058157db1e..34c70ebd94 100644
--- a/cdmlib-test/src/main/resources/dbscripts/001-cdm.h2.sql
+++ b/cdmlib-test/src/main/resources/dbscripts/001-cdm.h2.sql
@@ -907,6 +907,8 @@ CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE(
     UPDATED TIMESTAMP,
     TERMTYPE VARCHAR(4),
     IDINVOCABULARY VARCHAR(255),
+	SYMBOL VARCHAR(10),
+	REVERSESYMBOL VARCHAR(10),
     LSID_AUTHORITY VARCHAR(255),
     LSID_LSID VARCHAR(255),
     LSID_NAMESPACE VARCHAR(255),
@@ -958,6 +960,8 @@ CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_AUD(
     UPDATED TIMESTAMP,
     TERMTYPE VARCHAR(4),
     IDINVOCABULARY VARCHAR(255),
+	SYMBOL VARCHAR(10),
+	REVERSESYMBOL VARCHAR(10),
     LSID_AUTHORITY VARCHAR(255),
     LSID_LSID VARCHAR(255),
     LSID_NAMESPACE VARCHAR(255),
