HHH-13300 Correctly convert Hibernate exceptions to JPA in getSingleResult()

This commit is contained in:
Yoann Rodière 2019-03-05 10:26:37 +01:00
parent 53f70ab213
commit 4665fd9cd9
1 changed files with 1 additions and 6 deletions

View File

@ -1581,12 +1581,7 @@ public abstract class AbstractProducedQuery<R> implements QueryImplementor<R> {
return uniqueElement( list );
}
catch ( HibernateException e ) {
if ( getProducer().getFactory().getSessionFactoryOptions().isJpaBootstrap() ) {
throw getExceptionConverter().convert( e );
}
else {
throw e;
}
throw getExceptionConverter().convert( e );
}
}