Guys, i am trying with this (sorry for unclear)
in the first attempt (which is going to fail defintely)
Code:
try{
....
catch(Exception e) {
failure = true;
session.clear();
}
in the second attempt (it should pass, since for not-null column we are setting value)
Code:
try {
person.setAge(24);
if(failure)
person = session.merge(person);
session.save(person);
session.flush();
}catch(...) {
}
i am trying to apply this in our project(one save will trigger 23 tables- all associations and several childrens), once i did & tested sufficiently i will let you know more