minor
authorU-BGBM\k.luther <k.luther@BGBM11732.bgbm.fu-berlin.de>
Thu, 1 Oct 2015 09:03:13 +0000 (11:03 +0200)
committerU-BGBM\k.luther <k.luther@BGBM11732.bgbm.fu-berlin.de>
Thu, 1 Oct 2015 09:03:13 +0000 (11:03 +0200)
1  2 
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonNodeWizard.java

index 76119d2995c9c4ac87eb3cecf5db13b74860775a,a792ed4d3c5da5a9b02325a61fc53c8ef6079145..90a1dc935a1bca6b39b0ea00d3786b1e10ef45ce
@@@ -53,8 -53,12 +53,14 @@@ public class NewTaxonNodeWizard extend
              Taxon taxon = taxonNodePage.getTaxon();
              try{
                  TaxonNode taxonNode = parent.addChildTaxon(taxon, parent.getReference(), parent.getMicroReference());
-                 generatedTaxonNodeUuid = CdmStore.getService(ITaxonNodeService.class).saveOrUpdate(taxonNode);
-                // generatedTaxonNodeUuid = taxonNode.getUuid();
++
+                 if(CdmStore.getCurrentSessionManager().isRemoting()) {
+                     taxonNode = CdmStore.getService(ITaxonNodeService.class).merge(taxonNode);
+                 } else {
+                     taxonNode = CdmStore.getService(ITaxonNodeService.class).save(taxonNode);
+                 }
+                 generatedTaxonNodeUuid = taxonNode.getUuid();
++
                  Set<CdmBase> affectedObjects = new HashSet<CdmBase>();
                  //FIXME:Remoting Hack for now - need to generalise this
                  // by making the affected objects a set of ICdmBase