commit dc6599dd307f3d2902b66f0aeff0be370a464243
Author: m.doering <m.doering@localhost>
Date:   Thu Nov 15 16:17:49 2007 +0000

diff --git a/cdmlibrary/listAnnotatedClasses.py b/cdmlibrary/listAnnotatedClasses.py
index 3a653b6ab4..777e54f103 100644
--- a/cdmlibrary/listAnnotatedClasses.py
+++ b/cdmlibrary/listAnnotatedClasses.py
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 import os, sys
 
-modelDir="/Users/markus/workspace/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model"
+modelDir="src/main/java/eu/etaxonomy/cdm/model"
 modelPackage="eu.etaxonomy.cdm.model"
 
 print"<list>"
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/agent/Contact.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/agent/Contact.java
index 4c69da509e..a95f0f2d5c 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/agent/Contact.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/agent/Contact.java
@@ -35,6 +35,9 @@ public class Contact extends VersionableEntity {
 	private String phone;
 	private String fax;
 	private Set<Address> addresses;
+	
+	
+	@OneToMany
 	public Set<Address> getAddresses(){
 		return this.addresses;
 	}
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/agent/Institution.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/agent/Institution.java
index 8dcb3ba967..40c5b9d493 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/agent/Institution.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/agent/Institution.java
@@ -49,6 +49,7 @@ public class Institution extends IdentifiableEntity {
 		this.contact = contact;
 	}
 
+	@OneToMany
 	public Set<InstitutionType> getTypes(){
 		return this.types;
 	}
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/agent/Person.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/agent/Person.java
index ea14dbd0b7..87407dc6fd 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/agent/Person.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/agent/Person.java
@@ -49,6 +49,7 @@ public class Person extends IdentifiableEntity {
 	private Contact contact;
 	private Set<Keyword> keywords;
 
+	@OneToMany
 	public Set<InstitutionalMembership> getInstitutionalMemberships(){
 		return this.institutionalMemberships;
 	}
@@ -62,6 +63,7 @@ public class Person extends IdentifiableEntity {
 	}
 
 
+	@OneToMany
 	public Set<Keyword> getKeywords(){
 		return this.keywords;
 	}
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/common/AnnotatableEntity.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/common/AnnotatableEntity.java
index d6b9d7d7a2..42b6bf3016 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/common/AnnotatableEntity.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/common/AnnotatableEntity.java
@@ -30,6 +30,9 @@ public abstract class AnnotatableEntity extends VersionableEntity {
 	static Logger logger = Logger.getLogger(AnnotatableEntity.class);
 	private Set<Marker> markers;
 	private Set<Annotation> annotations;
+	
+	
+	@OneToMany
 	public Set<Marker> getMarkers(){
 		return this.markers;
 	}
@@ -50,6 +53,7 @@ public abstract class AnnotatableEntity extends VersionableEntity {
 
 	}
 
+	@OneToMany
 	public Set<Annotation> getAnnotations(){
 		return this.annotations;
 	}
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/common/CdmBase.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/common/CdmBase.java
index 503e5736fa..03ec4c3134 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/common/CdmBase.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/common/CdmBase.java
@@ -5,12 +5,15 @@ import java.beans.PropertyChangeSupport;
 import java.beans.PropertyChangeEvent;
 import java.io.Serializable;
 
+import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
 import javax.persistence.Id;
-import javax.persistence.MappedSuperclass;
+import javax.persistence.Inheritance;
+import javax.persistence.InheritanceType;
 
 
-@MappedSuperclass
+@Entity
+@Inheritance(strategy=InheritanceType.TABLE_PER_CLASS)
 public abstract class CdmBase implements Serializable{
 	
 	public CdmBase() {
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/common/DefinedTermBase.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/common/DefinedTermBase.java
index ee902f558d..72dedd19df 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/common/DefinedTermBase.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/common/DefinedTermBase.java
@@ -44,6 +44,9 @@ public abstract class DefinedTermBase extends VersionableEntity{
 	private DefinedTermBase partOf;
 	private Set<DefinedTermBase> includes;
 	private Set<Media> media;
+	
+	
+	@OneToMany
 	public Set<Representation> getRepresentations(){
 		return this.representations;
 	}
@@ -70,6 +73,7 @@ public abstract class DefinedTermBase extends VersionableEntity{
 		this.kindOf = kindOf;
 	}
 
+	@OneToMany
 	public Set<DefinedTermBase> getGeneralizationOf(){
 		return this.generalizationOf;
 	}
@@ -95,6 +99,7 @@ public abstract class DefinedTermBase extends VersionableEntity{
 		this.partOf = partOf;
 	}
 
+	@OneToMany
 	public Set<DefinedTermBase> getIncludes(){
 		return this.includes;
 	}
@@ -109,6 +114,7 @@ public abstract class DefinedTermBase extends VersionableEntity{
 	}
 
 
+	@OneToMany
 	public Set<Media> getMedia(){
 		return this.media;
 	}
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/common/Media.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/common/Media.java
index 3f204d71be..68d0320f98 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/common/Media.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/common/Media.java
@@ -40,6 +40,7 @@ public class Media extends AnnotatableEntity {
 	private Set<Rights> rights;
 	private Team artist;
 
+	@OneToMany
 	public Set<MediaInstance> getInstances(){
 		return this.instances;
 	}
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/Description.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/Description.java
index 7c35aa4877..cf70b33590 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/Description.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/Description.java
@@ -47,6 +47,7 @@ public class Description extends IdentifiableEntity {
 		this.source= source;
 	}
 
+	@OneToMany
 	public Set<NamedArea> getGeoScopes(){
 		return this.geoScopes;
 	}
@@ -61,6 +62,7 @@ public class Description extends IdentifiableEntity {
 	}
 
 	
+	@OneToMany
 	public Set<Scope> getScopes(){
 		return this.scopes;
 	}
@@ -75,6 +77,7 @@ public class Description extends IdentifiableEntity {
 	}
 
 	
+	@OneToMany
 	public Set<FeatureBase> getFeatures(){
 		return this.features;
 	}
@@ -102,6 +105,7 @@ public class Description extends IdentifiableEntity {
 	}
 
 
+	@OneToMany
 	public Set<ObservationalUnit> getObservationalUnits() {
 		return observationalUnits;
 	}
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/FeatureBase.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/FeatureBase.java
index e1960b9d5b..a1f66f6009 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/FeatureBase.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/FeatureBase.java
@@ -38,10 +38,11 @@ public abstract class FeatureBase extends ReferencedEntityBase {
 	private Set<Media> media;
 
 	
+	@OneToMany
 	public Set<Media> getMedia(){
 		return this.media;
 	}
-	private void setMedia(Set<Media> media) {
+	protected void setMedia(Set<Media> media) {
 		this.media = media;
 	}
 	public void addMedia(Media media){
@@ -60,10 +61,11 @@ public abstract class FeatureBase extends ReferencedEntityBase {
 	}
 
 	
+	@OneToMany
 	public Set<Modifier> getModifiers(){
 		return this.modifiers;
 	}
-	private void setModifiers(Set<Modifier> modifiers){
+	protected void setModifiers(Set<Modifier> modifiers){
 		this.modifiers = modifiers;
 	}
 	public void addModifier(Modifier modifier){
@@ -77,7 +79,7 @@ public abstract class FeatureBase extends ReferencedEntityBase {
 	public MultilanguageSet getModifyingText(){
 		return this.modifyingText;
 	}
-	private void setModifyingText(MultilanguageSet modifyingText){
+	protected void setModifyingText(MultilanguageSet modifyingText){
 		this.modifyingText = modifyingText;
 	}
 	public void addModifyingText(LanguageString description){
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/FeatureType.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/FeatureType.java
index 34f68cf44d..3f003a797e 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/FeatureType.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/FeatureType.java
@@ -90,11 +90,12 @@ public class FeatureType extends DefinedTermBase {
 		this.supportsCommonTaxonName = supportsCommonTaxonName;
 	}
 
+	@OneToMany
 	public Set<Enumeration> getRecommendedModifierEnumeration() {
 		return recommendedModifierEnumeration;
 	}
 
-	private void setRecommendedModifierEnumeration(
+	protected void setRecommendedModifierEnumeration(
 			Set<Enumeration> recommendedModifierEnumeration) {
 		this.recommendedModifierEnumeration = recommendedModifierEnumeration;
 	}
@@ -108,11 +109,12 @@ public class FeatureType extends DefinedTermBase {
 		this.recommendedModifierEnumeration.remove(recommendedModifierEnumeration);
 	}
 
+	@OneToMany
 	public Set<StatisticalMeasure> getRecommendedStatisticalMeasures() {
 		return recommendedStatisticalMeasures;
 	}
 
-	private void setRecommendedStatisticalMeasures(
+	protected void setRecommendedStatisticalMeasures(
 			Set<StatisticalMeasure> recommendedStatisticalMeasures) {
 		this.recommendedStatisticalMeasures = recommendedStatisticalMeasures;
 	}
@@ -126,11 +128,12 @@ public class FeatureType extends DefinedTermBase {
 		this.recommendedStatisticalMeasures.remove(recommendedStatisticalMeasure);
 	}
 
+	@OneToMany
 	public Set<Enumeration> getSupportedCategoricalEnumerations() {
 		return supportedCategoricalEnumerations;
 	}
 
-	private void setSupportedCategoricalEnumerations(
+	protected void setSupportedCategoricalEnumerations(
 			Set<Enumeration> supportedCategoricalEnumerations) {
 		this.supportedCategoricalEnumerations = supportedCategoricalEnumerations;
 	}
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/IdentificationKey.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/IdentificationKey.java
index 11dc176448..8c8bf76e15 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/IdentificationKey.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/IdentificationKey.java
@@ -28,10 +28,12 @@ import javax.persistence.*;
 public class IdentificationKey extends Media {
 	static Logger logger = Logger.getLogger(IdentificationKey.class);
 	private Set<Taxon> coveredTaxa;
+	
+	@OneToMany
 	public Set<Taxon> getCoveredTaxa() {
 		return coveredTaxa;
 	}
-	private void setCoveredTaxa(Set<Taxon> coveredTaxa) {
+	protected void setCoveredTaxa(Set<Taxon> coveredTaxa) {
 		this.coveredTaxa = coveredTaxa;
 	}
 	public void addCoveredTaxon(Taxon taxon) {
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/QuantitativeData.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/QuantitativeData.java
index 7775ff9adf..aebbce20f1 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/QuantitativeData.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/QuantitativeData.java
@@ -27,10 +27,11 @@ public class QuantitativeData extends FeatureBase {
 	private Set<StatisticalMeasurementValue> statisticalValues;
 	
 
+	@OneToMany
 	public Set<StatisticalMeasurementValue> getStatisticalValues() {
 		return statisticalValues;
 	}
-	private void setStatisticalValues(
+	protected void setStatisticalValues(
 			Set<StatisticalMeasurementValue> statisticalValues) {
 		this.statisticalValues = statisticalValues;
 	}
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/StateData.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/StateData.java
index fddfb1fcf0..1ca4f0f52c 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/StateData.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/StateData.java
@@ -42,6 +42,7 @@ public class StateData extends VersionableEntity {
 	}
 	
 
+	@OneToMany
 	public Set<Modifier> getModifiers(){
 		return this.modifiers;
 	}
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/StatisticalMeasurementValue.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/StatisticalMeasurementValue.java
index 92fd4da590..dacc3e3dbb 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/StatisticalMeasurementValue.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/description/StatisticalMeasurementValue.java
@@ -41,10 +41,13 @@ public class StatisticalMeasurementValue extends VersionableEntity {
 	public void setValue(float value){
 		this.value = value;
 	}
+	
+	
+	@OneToMany
 	public Set<Modifier> getModifiers() {
 		return modifiers;
 	}
-	private void setModifiers(Set<Modifier> modifiers) {
+	protected void setModifiers(Set<Modifier> modifiers) {
 		this.modifiers = modifiers;
 	}
 	public void addModifier(Modifier modifier) {
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/location/WaterbodyOrCountry.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/location/WaterbodyOrCountry.java
index 3f1a00c753..8ea7f164d4 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/location/WaterbodyOrCountry.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/location/WaterbodyOrCountry.java
@@ -31,6 +31,7 @@ public class WaterbodyOrCountry extends DefinedTermBase {
 	private Set<Continent> continents;
 
 
+	@OneToMany
 	public Set<Continent> getContinents() {
 		return continents;
 	}
@@ -38,7 +39,7 @@ public class WaterbodyOrCountry extends DefinedTermBase {
 	public void setContinents(Set<Continent> continents) {
 		this.continents = continents;
 	}
-	private void addContinents(Continent continent) {
+	protected void addContinents(Continent continent) {
 		this.continents.add(continent);
 	}
 	public void removeContinents(Continent continent) {
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/molecular/DnaSample.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/molecular/DnaSample.java
index 6124e2b8ed..c6b1f6b0d9 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/molecular/DnaSample.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/molecular/DnaSample.java
@@ -36,11 +36,12 @@ public class DnaSample extends IdentifiableEntity {
 
 	
 
+	@OneToMany
 	public Set<Sequence> getSequences() {
 		return sequences;
 	}
 
-	private void setSequences(Set<Sequence> sequences) {
+	protected void setSequences(Set<Sequence> sequences) {
 		this.sequences = sequences;
 	}
 	public void addSequences(Sequence sequence) {
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/molecular/PhylogeneticTree.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/molecular/PhylogeneticTree.java
index ce18140dba..aaae0ed02e 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/molecular/PhylogeneticTree.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/molecular/PhylogeneticTree.java
@@ -25,10 +25,12 @@ import javax.persistence.*;
 public class PhylogeneticTree extends ReferencedMedia {
 	static Logger logger = Logger.getLogger(PhylogeneticTree.class);
 	private Set<Sequence> usedSequences;
+	
+	@OneToMany
 	public Set<Sequence> getUsedSequences() {
 		return usedSequences;
 	}
-	private void setUsedSequences(Set<Sequence> usedSequences) {
+	protected void setUsedSequences(Set<Sequence> usedSequences) {
 		this.usedSequences = usedSequences;
 	}
 	public void addUsedSequences(Sequence usedSequence) {
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/molecular/Sequence.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/molecular/Sequence.java
index f2ad5dc6c1..eaec745c67 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/molecular/Sequence.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/molecular/Sequence.java
@@ -69,11 +69,12 @@ public class Sequence extends IdentifiableEntity implements IReferencedEntity {
 
 
 	
+	@OneToMany
 	public Set<ReferenceBase> getCitations() {
 		return citations;
 	}
 
-	private void setCitations(Set<ReferenceBase> citations) {
+	protected void setCitations(Set<ReferenceBase> citations) {
 		this.citations = citations;
 	}
 	public void addCitation(ReferenceBase citation) {
@@ -84,11 +85,12 @@ public class Sequence extends IdentifiableEntity implements IReferencedEntity {
 	}
 
 	
+	@OneToMany
 	public Set<GenBankAccession> getGenBankAccession() {
 		return genBankAccession;
 	}
 
-	private void setGenBankAccession(Set<GenBankAccession> genBankAccession) {
+	protected void setGenBankAccession(Set<GenBankAccession> genBankAccession) {
 		this.genBankAccession = genBankAccession;
 	}
 	public void addGenBankAccession(GenBankAccession genBankAccession) {
@@ -99,11 +101,12 @@ public class Sequence extends IdentifiableEntity implements IReferencedEntity {
 	}
 
 	
+	@OneToMany
 	public Set<Media> getChromatograms() {
 		return chromatograms;
 	}
 
-	private void setChromatograms(Set<Media> chromatograms) {
+	protected void setChromatograms(Set<Media> chromatograms) {
 		this.chromatograms = chromatograms;
 	}
 	public void addChromatogram(Media chromatogram) {
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/name/BotanicalName.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/name/BotanicalName.java
index f5b97b2ed9..58cac46c5c 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/name/BotanicalName.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/name/BotanicalName.java
@@ -41,10 +41,11 @@ public class BotanicalName extends NonViralName {
 
 	
 
+	@OneToMany
 	public Set<HybridRelationship> getParentRelationships() {
 		return parentRelationships;
 	}
-	private void setParentRelationships(Set<HybridRelationship> parentRelationships) {
+	protected void setParentRelationships(Set<HybridRelationship> parentRelationships) {
 		this.parentRelationships = parentRelationships;
 	}
 	public void addParentRelationships(HybridRelationship parentRelationship) {
@@ -56,10 +57,11 @@ public class BotanicalName extends NonViralName {
 
 
 
+	@OneToMany
 	public Set<HybridRelationship> getChildRelationships() {
 		return childRelationships;
 	}
-	private void setChildRelationships(Set<HybridRelationship> childRelationships) {
+	protected void setChildRelationships(Set<HybridRelationship> childRelationships) {
 		this.childRelationships = childRelationships;
 	}
 	public void addChildRelationship(HybridRelationship childRelationship) {
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/name/ITypeDesignation.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/name/ITypeDesignation.java
index 28aa18ebdd..861ec007a8 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/name/ITypeDesignation.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/name/ITypeDesignation.java
@@ -10,6 +10,8 @@
 package eu.etaxonomy.cdm.model.name;
 
 
+import javax.persistence.MappedSuperclass;
+
 import org.apache.log4j.Logger;
 import eu.etaxonomy.cdm.model.Description;
 
@@ -18,6 +20,7 @@ import eu.etaxonomy.cdm.model.Description;
  * @version 1.0
  * @created 08-Nov-2007 13:06:31
  */
+@MappedSuperclass
 public interface ITypeDesignation {
 
 }
\ No newline at end of file
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/name/TaxonNameBase.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/name/TaxonNameBase.java
index cee3878128..aa9dccc809 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/name/TaxonNameBase.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/name/TaxonNameBase.java
@@ -74,10 +74,11 @@ public abstract class TaxonNameBase extends IdentifiableEntity implements IRefer
 
 
 
+	@OneToMany
 	public Set<ITypeDesignation> getTypeDesignations() {
 		return typeDesignations;
 	}
-	private void setTypeDesignations(Set<ITypeDesignation> typeDesignations) {
+	protected void setTypeDesignations(Set<ITypeDesignation> typeDesignations) {
 		this.typeDesignations = typeDesignations;
 	}
 	public void addTypeDesignation(ITypeDesignation typeDesignation) {
@@ -89,18 +90,20 @@ public abstract class TaxonNameBase extends IdentifiableEntity implements IRefer
 
 
 
+	@OneToMany
 	public Set<NameRelationship> getNameRelations() {
 		return nameRelations;
 	}
-	private void setNameRelations(Set<NameRelationship> nameRelations) {
+	protected void setNameRelations(Set<NameRelationship> nameRelations) {
 		this.nameRelations = nameRelations;
 	}
 
 
+	@OneToMany
 	public Set<NameRelationship> getInverseNameRelations() {
 		return inverseNameRelations;
 	}
-	private void setInverseNameRelations(Set<NameRelationship> inverseNameRelations) {
+	protected void setInverseNameRelations(Set<NameRelationship> inverseNameRelations) {
 		this.inverseNameRelations = inverseNameRelations;
 	}
 
@@ -118,10 +121,11 @@ public abstract class TaxonNameBase extends IdentifiableEntity implements IRefer
 
 	
 
+	@OneToMany
 	public Set<NomenclaturalStatus> getStatus() {
 		return status;
 	}
-	private void setStatus(Set<NomenclaturalStatus> status) {
+	protected void setStatus(Set<NomenclaturalStatus> status) {
 		this.status = status;
 	}
 	public void addStatus(NomenclaturalStatus status) {
@@ -133,10 +137,11 @@ public abstract class TaxonNameBase extends IdentifiableEntity implements IRefer
 
 
 
+	@OneToMany
 	public Set<TaxonNameBase> getNewCombinations() {
 		return newCombinations;
 	}
-	private void setNewCombinations(Set<TaxonNameBase> newCombinations) {
+	protected void setNewCombinations(Set<TaxonNameBase> newCombinations) {
 		this.newCombinations = newCombinations;
 	}
 	public void addNewCombination(TaxonNameBase newCombination) {
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/occurrence/LivingIndividual.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/occurrence/LivingIndividual.java
index bbca7be07f..b758a3d8eb 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/occurrence/LivingIndividual.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/occurrence/LivingIndividual.java
@@ -27,10 +27,11 @@ public class LivingIndividual extends Occurrence {
 	private Set<LivingIndividual> offspring;
 	
 	
+	@OneToMany
 	public Set<LivingIndividual> getParents() {
 		return parents;
 	}
-	private void setParents(Set<LivingIndividual> parents) {
+	protected void setParents(Set<LivingIndividual> parents) {
 		this.parents = parents;
 	}
 	public void addParents(LivingIndividual parent) {
@@ -41,10 +42,11 @@ public class LivingIndividual extends Occurrence {
 	}
 	
 	
+	@OneToMany
 	public Set<LivingIndividual> getOffspring() {
 		return offspring;
 	}
-	private void setOffspring(Set<LivingIndividual> offspring) {
+	protected void setOffspring(Set<LivingIndividual> offspring) {
 		this.offspring = offspring;
 	}
 	public void addOffspring(LivingIndividual offspring) {
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/occurrence/Occurrence.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/occurrence/Occurrence.java
index dff967fc60..cc2c10d33b 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/occurrence/Occurrence.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/occurrence/Occurrence.java
@@ -66,10 +66,11 @@ public class Occurrence extends IdentifiableEntity {
 
 	
 
+	@OneToMany
 	public Set<Media> getMedia() {
 		return media;
 	}
-	private void setMedia(Set<Media> media) {
+	protected void setMedia(Set<Media> media) {
 		this.media = media;
 	}
 	public void addMedia(Media media) {
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/taxon/Synonym.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/taxon/Synonym.java
index 57780490b2..59ca1e8bfb 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/taxon/Synonym.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/taxon/Synonym.java
@@ -25,10 +25,11 @@ public class Synonym extends TaxonBase {
 	private Set<SynonymRelationship> synoynmRelations;
 
 
+	@OneToMany
 	public Set<SynonymRelationship> getSynoynmRelations() {
 		return synoynmRelations;
 	}
-	private void setSynoynmRelations(Set<SynonymRelationship> synoynmRelations) {
+	protected void setSynoynmRelations(Set<SynonymRelationship> synoynmRelations) {
 		this.synoynmRelations = synoynmRelations;
 	}
 	public void addSynoynmRelations(SynonymRelationship synoynmRelation) {
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/taxon/Taxon.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/taxon/Taxon.java
index 35ee5b466c..7ab22b8920 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/taxon/Taxon.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/taxon/Taxon.java
@@ -28,10 +28,11 @@ public class Taxon extends TaxonBase {
 	private Set<TaxonRelationship> inverseTaxonRelations;
 
 
+	@OneToMany
 	public Set<Description> getDescriptions() {
 		return descriptions;
 	}
-	private void setDescriptions(Set<Description> descriptions) {
+	protected void setDescriptions(Set<Description> descriptions) {
 		this.descriptions = descriptions;
 	}
 	public void addDescriptions(Description description) {
@@ -42,19 +43,21 @@ public class Taxon extends TaxonBase {
 	}
 
 
+	@OneToMany
 	public Set<SynonymRelationship> getInverseSynonymRelations() {
 		return inverseSynonymRelations;
 	}
-	private void setInverseSynonymRelations(
+	protected void setInverseSynonymRelations(
 			Set<SynonymRelationship> inverseSynonymRelations) {
 		this.inverseSynonymRelations = inverseSynonymRelations;
 	}
 
 
+	@OneToMany
 	public Set<TaxonRelationship> getTaxonRelations() {
 		return taxonRelations;
 	}
-	private void setTaxonRelations(Set<TaxonRelationship> taxonRelations) {
+	protected void setTaxonRelations(Set<TaxonRelationship> taxonRelations) {
 		this.taxonRelations = taxonRelations;
 	}
 	public void addTaxonRelations(TaxonRelationship taxonRelation) {
@@ -65,10 +68,11 @@ public class Taxon extends TaxonBase {
 	}
 
 
+	@OneToMany
 	public Set<TaxonRelationship> getInverseTaxonRelations() {
 		return inverseTaxonRelations;
 	}
-	private void setInverseTaxonRelations(
+	protected void setInverseTaxonRelations(
 			Set<TaxonRelationship> inverseTaxonRelations) {
 		this.inverseTaxonRelations = inverseTaxonRelations;
 	}
diff --git a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/view/View.java b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/view/View.java
index 2baf639b09..83130f43f0 100644
--- a/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/view/View.java
+++ b/cdmlibrary/src/main/java/eu/etaxonomy/cdm/model/view/View.java
@@ -74,10 +74,11 @@ public class View extends CdmBase implements IReferencedEntity{
 	}
 	
 
+	@OneToMany
 	public Set<View> getSuperViews() {
 		return superViews;
 	}
-	public void setSuperViews(Set<View> superViews) {
+	protected void setSuperViews(Set<View> superViews) {
 		this.superViews = superViews;
 	}
 	public void addSuperView(View superView) {
@@ -88,10 +89,11 @@ public class View extends CdmBase implements IReferencedEntity{
 	}
 	
 
+	@OneToMany
 	public Set<CdmBase> getMembers() {
 		return members;
 	}
-	private void setMembers(Set<CdmBase> members) {
+	protected void setMembers(Set<CdmBase> members) {
 		this.members = members;
 	}
 	public void addMember(CdmBase member) {
@@ -102,10 +104,11 @@ public class View extends CdmBase implements IReferencedEntity{
 	}
 
 	
+	@OneToMany
 	public Set<CdmBase> getNonMembers() {
 		return nonMembers;
 	}
-	private void setNonMembers(Set<CdmBase> nonMembers) {
+	protected void setNonMembers(Set<CdmBase> nonMembers) {
 		this.nonMembers = nonMembers;
 	}
 	public void addNonMember(CdmBase member) {
diff --git a/cdmlibrary/src/main/resources/editCdm.spring.cfg.xml b/cdmlibrary/src/main/resources/editCdm.spring.cfg.xml
index 3e8e4517c6..88550a2b09 100644
--- a/cdmlibrary/src/main/resources/editCdm.spring.cfg.xml
+++ b/cdmlibrary/src/main/resources/editCdm.spring.cfg.xml
@@ -42,7 +42,7 @@
 			</list>
 		</property>
 		
-        <property name="annotatedClasses">
+        <property name="annotatedClasses">
         	<list>
         		<value>eu.etaxonomy.cdm.model.Description</value>
         		<value>eu.etaxonomy.cdm.model.agent.Address</value>
@@ -57,7 +57,6 @@
         		<value>eu.etaxonomy.cdm.model.common.AudioFile</value>
         		<value>eu.etaxonomy.cdm.model.common.CdmBase</value>
         		<value>eu.etaxonomy.cdm.model.common.DefinedTermBase</value>
-        		<value>eu.etaxonomy.cdm.model.common.EntityInSource</value>
         		<value>eu.etaxonomy.cdm.model.common.EnumeratedTermBase</value>
         		<value>eu.etaxonomy.cdm.model.common.Enumeration</value>
         		<value>eu.etaxonomy.cdm.model.common.Extension</value>
@@ -65,8 +64,8 @@
         		<value>eu.etaxonomy.cdm.model.common.Figure</value>
         		<value>eu.etaxonomy.cdm.model.common.IdentifiableEntity</value>
         		<value>eu.etaxonomy.cdm.model.common.ImageFile</value>
+        		<value>eu.etaxonomy.cdm.model.common.IOriginalSource</value>
         		<value>eu.etaxonomy.cdm.model.common.IReferencedEntity</value>
-        		<value>eu.etaxonomy.cdm.model.common.ISourcedEntity</value>
         		<value>eu.etaxonomy.cdm.model.common.Keyword</value>
         		<value>eu.etaxonomy.cdm.model.common.Language</value>
         		<value>eu.etaxonomy.cdm.model.common.LanguageString</value>
@@ -76,6 +75,8 @@
         		<value>eu.etaxonomy.cdm.model.common.MediaInstance</value>
         		<value>eu.etaxonomy.cdm.model.common.MovieFile</value>
         		<value>eu.etaxonomy.cdm.model.common.MultilanguageSet</value>
+        		<value>eu.etaxonomy.cdm.model.common.OriginalSource</value>
+        		<value>eu.etaxonomy.cdm.model.common.package-info</value>
         		<value>eu.etaxonomy.cdm.model.common.ReferencedEntityBase</value>
         		<value>eu.etaxonomy.cdm.model.common.ReferencedMedia</value>
         		<value>eu.etaxonomy.cdm.model.common.Representation</value>
@@ -182,7 +183,7 @@
         		<value>eu.etaxonomy.cdm.model.taxon.TaxonRelationship</value>
         		<value>eu.etaxonomy.cdm.model.view.View</value>
         	</list>
-        			</property>
+        </property>
 		<property name="hibernateProperties">
             <props>
                 <prop key="hibernate.hbm2ddl.auto">update</prop>
