Project

General

Profile

« Previous | Next » 

Revision 4f494eae

Added by Cherian Mathew over 8 years ago

Add commented code for copying properties

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/hibernate/PostMergeEntityListener.java
49 49
            CdmBase original = (CdmBase) event.getOriginal();
50 50
            CdmBase result = (CdmBase) event.getResult();
51 51
            if(original != null && Hibernate.isInitialized(original) && original.getId() == 0 &&
52
                    result != null && Hibernate.isInitialized(result)) {
52
                    result != null && Hibernate.isInitialized(result) && result.getId() > 0) {
53 53
                original.setId(result.getId());
54

  
54
                //FIXME: Once the EventType.SAVE_UPDATE listeners are cleaned up
55
                //       the same calls should be made on the result object
56
                //       followed by a copy (uncomment code below) to the
57
                //       original object
58
//                try {
59
//                    BeanUtils.copyProperties(original, result);
60
//                } catch (IllegalAccessException e) {
61
//                    // TODO Auto-generated catch block
62
//                    e.printStackTrace();
63
//                } catch (InvocationTargetException e) {
64
//                    // TODO Auto-generated catch block
65
//                    e.printStackTrace();
66
//                }
55 67
            }
56 68
        }
57 69
    }

Also available in: Unified diff