Hi
I use hibernate 5.2.10 & spring boot 2.1.1 & JTA & Weblogic 12.2.2.1
Now when we save any entity that has some constraint such as unique constraint & foreign key constraint … we get error but we could not get clear Exception in our back-end. Because our Exception catch in ResultSetReturnImpl and the result print with SqlExceptionHelper, so we could not catch those exception!!
My code is
public viod add (T entity){
Session session = getSession();
try{
session.save(entity);
}catch (TransactionException ex){
System.out.println("++++++++"); // Do Not go here when throw exception for unique constraint
}
}
So we could not find any answer for this problem!
Is there any answer??
Could we override ResultSetReturnImpl and customize this method?