Reload type designation before deleting it to avoid caching conflicts.
authorPatrick Plitzner <p.plitzner@bgbm.org>
Mon, 4 Apr 2016 04:27:22 +0000 (06:27 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 5 Apr 2016 06:04:19 +0000 (08:04 +0200)
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/NameServiceImpl.java

index eebc4d92fca1de434dc36cee1baa8e6b995687c7..a3b1cc472b83841ffe1c06e23b0a1005835e6f94 100644 (file)
@@ -196,6 +196,10 @@ public class NameServiceImpl extends IdentifiableServiceBase<TaxonNameBase,ITaxo
      */
     @Override
     public DeleteResult deleteTypeDesignation(TaxonNameBase name, TypeDesignationBase typeDesignation){
+       if(typeDesignation.getId()!=0){
+               typeDesignation = HibernateProxyHelper.deproxy(referencedEntityDao.load(typeDesignation.getUuid()), TypeDesignationBase.class);
+       }
+        
         DeleteResult result = new DeleteResult();
         if (name == null && typeDesignation == null){
             result.setError();