Project

General

Profile

Revision cfe73b31

IDcfe73b3150e0ec964daf1d6f9d61211178240373
Parent 69e38fad
Child 949cf38a

Added by Katja Luther 12 months ago

ref #8115: do not delete description when moving the last element

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/DescriptionServiceImpl.java
734 734
            }
735 735
            if (! isCopy){
736 736
                description.removeElement(element);
737
                if (description.getElements().isEmpty()){
738
                   if (description instanceof TaxonDescription){
739
                       TaxonDescription taxDescription = HibernateProxyHelper.deproxy(description, TaxonDescription.class);
740
                       if (taxDescription.getTaxon() != null){
741
                           taxDescription.getTaxon().removeDescription((TaxonDescription)description);
742
                       }
743
                   }
744
                    dao.delete(description);
745

  
746
                }//else{
737
//                if (description.getElements().isEmpty()){
738
//                   if (description instanceof TaxonDescription){
739
//                       TaxonDescription taxDescription = HibernateProxyHelper.deproxy(description, TaxonDescription.class);
740
//                       if (taxDescription.getTaxon() != null){
741
//                           taxDescription.getTaxon().removeDescription((TaxonDescription)description);
742
//                       }
743
//                   }
744
//                    dao.delete(description);
745
//
746
//                }//else{
747 747
//                    dao.saveOrUpdate(description);
748 748
//                    result.addUpdatedObject(description);
749 749
//                }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)