1. How to save object graph WITHOUT cascade.save_or_update forum.hibernate.org// Cloning dependencies to another array, cleaning them in A and persisting A. Then adding copies back to A :( List copyOfB = new ArrayList(A.getB()); A.getB().clear(); // The same two actions for C and D session.save(A); for(B b: copyOfB) { A.getB().add(b); b.setParent(A); session.save(b); } // The same for C and D... tx.commit(); ... |
2. does cascade-merge work for entire object graph forum.hibernate.orgGuys , I posted one question but no body answered my question and i guess i know the reason ( I think it was length of my post and all the code i wrote in that post :)) ). So this time i m going to frame my question differently. Ok..here i go (Please have patience i am a hibernate newbie) ... |