HHH-13300 Correctly convert Hibernate exceptions to JPA in getSingleResult()
This commit is contained in:
parent
53f70ab213
commit
4665fd9cd9
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue