I\'m using a relational DB using a single column pk with a few nested tables.
I need to add a simple archiving to my project. The archiving only happens when the appl
1- Add commons-lang dependency to pom.xml file
commons-lang commons-lang 2.6
2- Import org.apache.commons.lang.SerializationUtils 3- Use SerializationUtils.clone(oldObj) ex. Class1 newObj = (Class1) SerializationUtils.clone(oldObj);
org.apache.commons.lang.SerializationUtils
SerializationUtils.clone(oldObj)
Class1 newObj = (Class1) SerializationUtils.clone(oldObj);
see also java-deep-copy