commit 18f20e1c506661ff95ba0c8f46b8d4bee95c2fcc
Author: Andreas Kohlbecker <a.kohlbecker@bgbm.org>
Date:   Mon Apr 30 09:45:19 2018 +0200

    ref #7386 adding missing setBasionyms() method to taxonNameDTO - 2

diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/model/name/TaxonNameDTO.java b/src/main/java/eu/etaxonomy/cdm/vaadin/model/name/TaxonNameDTO.java
index 1ec467cb..60744bb2 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/model/name/TaxonNameDTO.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/model/name/TaxonNameDTO.java
@@ -8,10 +8,8 @@
 */
 package eu.etaxonomy.cdm.vaadin.model.name;
 
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
-import java.util.Map;
 import java.util.Set;
 
 import org.joda.time.DateTime;
@@ -90,21 +88,20 @@ public class TaxonNameDTO extends CdmEntityDecoraterDTO<TaxonName> {
      * @param direction
      */
     protected void setRelatedTaxa(Direction direction, NameRelationshipType relType, Set<TaxonName> basionyms) {
-        Map<Integer, TaxonName> currentBasionymUuids = new HashMap<>();
-        Set<Integer> basionymsSeen = new HashSet<>();
+        Set<TaxonName> currentBasionyms = new HashSet<>();
+        Set<TaxonName> basionymsSeen = new HashSet<>();
 
         for(TaxonName tn : name.getRelatedNames(direction, relType)){
-            currentBasionymUuids.put(tn.getId(), tn);
+            currentBasionyms.add(tn);
         }
         for(TaxonName tn : basionyms){
-            if(!currentBasionymUuids.containsKey(tn.getId())){
+            if(!currentBasionyms.contains(tn)){
                 name.addBasionym(tn);
-            } else {
-                basionymsSeen.add(tn.getId());
             }
+            basionymsSeen.add(tn);
         }
-        for(TaxonName tn : basionyms){
-            if(!basionymsSeen.contains(tn.getId())){
+        for(TaxonName tn : currentBasionyms){
+            if(!basionymsSeen.contains(tn)){
                 name.removeRelationWithTaxonName(tn, direction, relType);
             }
         }
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNameEditorPresenter.java b/src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNameEditorPresenter.java
index 3b6f9dd7..6438c9b0 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNameEditorPresenter.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNameEditorPresenter.java
@@ -10,9 +10,7 @@ package eu.etaxonomy.cdm.vaadin.view.name;
 
 import java.util.Arrays;
 import java.util.EnumSet;
-import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 import java.util.UUID;
 
 import org.apache.log4j.Logger;
@@ -28,7 +26,6 @@ import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.agent.Person;
 import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
 import eu.etaxonomy.cdm.model.common.TermType;
-import eu.etaxonomy.cdm.model.name.NameRelationship;
 import eu.etaxonomy.cdm.model.name.Rank;
 import eu.etaxonomy.cdm.model.name.TaxonName;
 import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
@@ -239,11 +236,13 @@ public class TaxonNameEditorPresenter extends AbstractCdmDTOEditorPresenter<Taxo
     @Override
     protected TaxonNameDTO handleTransientProperties(TaxonNameDTO dto) {
 
-        TaxonName bean = cdmEntity(dto);
 
         logger.trace(this._toString() + ".onEditorSaveEvent - handling transient properties");
 
+        /*
+        dto.updateTargetEntity();
 
+        TaxonName bean = cdmEntity(dto);
         List<TaxonName> newBasionymNames = getView().getBasionymComboboxSelect().getValueFromNestedFields();
         Set<TaxonName> oldBasionyms = bean.getBasionyms();
         Set<TaxonName> updateBasionyms = new HashSet<>();
@@ -277,6 +276,7 @@ public class TaxonNameEditorPresenter extends AbstractCdmDTOEditorPresenter<Taxo
                 bean.addBasionym(addBasionymName);
             }
         }
+        */
         return dto;
     }
 
diff --git a/src/main/java/eu/etaxonomy/vaadin/component/ToManyRelatedEntitiesListSelect.java b/src/main/java/eu/etaxonomy/vaadin/component/ToManyRelatedEntitiesListSelect.java
index 371b4dae..e323de71 100644
--- a/src/main/java/eu/etaxonomy/vaadin/component/ToManyRelatedEntitiesListSelect.java
+++ b/src/main/java/eu/etaxonomy/vaadin/component/ToManyRelatedEntitiesListSelect.java
@@ -549,12 +549,12 @@ public class ToManyRelatedEntitiesListSelect<V extends Object, F extends Abstrac
             }
         }
         //
+         */
         // calling super.commit() is useless if operating on a transient property!!
         super.commit();
-        if(getValue().isEmpty() && valueInitiallyWasNull){
-            setPropertyDataSource(null);
-        }
-         */
+//        if(getValue().isEmpty() && valueInitiallyWasNull){
+//            setPropertyDataSource(null);
+//        }
     }
 
     /**
