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

(cherry picked from commit 4665fd9cd9)
This commit is contained in:
Yoann Rodière 2019-03-05 10:26:37 +01:00 committed by gbadner
parent 8d4c47bffc
commit a3433be822
1 changed files with 1 additions and 6 deletions

View File

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