Browse Source

Merge branch '6.0.x'

# Conflicts:
#	spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaDialect.java
pull/31416/head
Juergen Hoeller 1 year ago
parent
commit
653a631df5
  1. 2
      spring-orm/src/main/java/org/springframework/orm/hibernate5/HibernateExceptionTranslator.java
  2. 2
      spring-orm/src/main/java/org/springframework/orm/hibernate5/HibernateTransactionManager.java

2
spring-orm/src/main/java/org/springframework/orm/hibernate5/HibernateExceptionTranslator.java

@ -94,7 +94,7 @@ public class HibernateExceptionTranslator implements PersistenceExceptionTransla
DataAccessException dae = this.jdbcExceptionTranslator.translate( DataAccessException dae = this.jdbcExceptionTranslator.translate(
"Hibernate operation: " + jdbcEx.getMessage(), jdbcEx.getSQL(), jdbcEx.getSQLException()); "Hibernate operation: " + jdbcEx.getMessage(), jdbcEx.getSQL(), jdbcEx.getSQLException());
if (dae != null) { if (dae != null) {
throw dae; return dae;
} }
} }
return SessionFactoryUtils.convertHibernateAccessException(ex); return SessionFactoryUtils.convertHibernateAccessException(ex);

2
spring-orm/src/main/java/org/springframework/orm/hibernate5/HibernateTransactionManager.java

@ -784,8 +784,6 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
/** /**
* Convert the given HibernateException to an appropriate exception * Convert the given HibernateException to an appropriate exception
* from the {@code org.springframework.dao} hierarchy. * from the {@code org.springframework.dao} hierarchy.
* <p>Will automatically apply a specified SQLExceptionTranslator to a
* Hibernate JDBCException, else rely on Hibernate's default translation.
* @param ex the HibernateException that occurred * @param ex the HibernateException that occurred
* @return a corresponding DataAccessException * @return a corresponding DataAccessException
* @see SessionFactoryUtils#convertHibernateAccessException * @see SessionFactoryUtils#convertHibernateAccessException

Loading…
Cancel
Save