mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-26 00:39:01 +00:00
Upgrade to Hibernate ORM 7.1
Closes gh-35308
This commit is contained in:
+3
-3
@@ -62,7 +62,7 @@ import org.springframework.core.type.filter.TypeFilter;
|
||||
* way to set up a shared Hibernate SessionFactory in a Spring application context; the
|
||||
* SessionFactory can then be passed to data access objects via dependency injection.
|
||||
*
|
||||
* <p>Compatible with Hibernate ORM 7.0, as of Spring Framework 7.0.
|
||||
* <p>Compatible with Hibernate ORM 7.1, as of Spring Framework 7.0.
|
||||
* This Hibernate-specific {@code LocalSessionFactoryBean} can be an immediate alternative
|
||||
* to {@link org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean} for
|
||||
* common JPA purposes: The Hibernate {@code SessionFactory} will natively expose the JPA
|
||||
@@ -109,7 +109,7 @@ public class LocalSessionFactoryBean extends HibernateExceptionTranslator
|
||||
|
||||
private @Nullable MultiTenantConnectionProvider<?> multiTenantConnectionProvider;
|
||||
|
||||
private @Nullable CurrentTenantIdentifierResolver<Object> currentTenantIdentifierResolver;
|
||||
private @Nullable CurrentTenantIdentifierResolver<?> currentTenantIdentifierResolver;
|
||||
|
||||
private @Nullable Properties hibernateProperties;
|
||||
|
||||
@@ -295,7 +295,7 @@ public class LocalSessionFactoryBean extends HibernateExceptionTranslator
|
||||
* Set a {@link CurrentTenantIdentifierResolver} to be passed on to the SessionFactory.
|
||||
* @see LocalSessionFactoryBuilder#setCurrentTenantIdentifierResolver
|
||||
*/
|
||||
public void setCurrentTenantIdentifierResolver(CurrentTenantIdentifierResolver<Object> currentTenantIdentifierResolver) {
|
||||
public void setCurrentTenantIdentifierResolver(CurrentTenantIdentifierResolver<?> currentTenantIdentifierResolver) {
|
||||
this.currentTenantIdentifierResolver = currentTenantIdentifierResolver;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -80,7 +80,7 @@ import org.springframework.util.ClassUtils;
|
||||
* Typically combined with {@link HibernateTransactionManager} for declarative
|
||||
* transactions against the {@code SessionFactory} and its JDBC {@code DataSource}.
|
||||
*
|
||||
* <p>Compatible with Hibernate ORM 7.0, as of Spring Framework 7.0.
|
||||
* <p>Compatible with Hibernate ORM 7.1, as of Spring Framework 7.0.
|
||||
* This Hibernate-specific factory builder can also be a convenient way to set up
|
||||
* a JPA {@code EntityManagerFactory} since the Hibernate {@code SessionFactory}
|
||||
* natively exposes the JPA {@code EntityManagerFactory} interface as well now.
|
||||
@@ -261,7 +261,7 @@ public class LocalSessionFactoryBuilder extends Configuration {
|
||||
* @see AvailableSettings#MULTI_TENANT_IDENTIFIER_RESOLVER
|
||||
*/
|
||||
@Override
|
||||
public LocalSessionFactoryBuilder setCurrentTenantIdentifierResolver(CurrentTenantIdentifierResolver<Object> currentTenantIdentifierResolver) {
|
||||
public LocalSessionFactoryBuilder setCurrentTenantIdentifierResolver(CurrentTenantIdentifierResolver<?> currentTenantIdentifierResolver) {
|
||||
getProperties().put(AvailableSettings.MULTI_TENANT_IDENTIFIER_RESOLVER, currentTenantIdentifierResolver);
|
||||
super.setCurrentTenantIdentifierResolver(currentTenantIdentifierResolver);
|
||||
return this;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* but potentially also for JPA repositories or mixed use of native Hibernate and JPA.
|
||||
*
|
||||
* <p>As of Spring Framework 7.0, this package supersedes {@code orm.hibernate5} -
|
||||
* now for use with Hibernate ORM 7.0, tightly integrated with JPA.
|
||||
* now for use with Hibernate ORM 7.1+, tightly integrated with JPA.
|
||||
*/
|
||||
@NullMarked
|
||||
package org.springframework.orm.jpa.hibernate;
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ import org.springframework.transaction.support.ResourceTransactionDefinition;
|
||||
|
||||
/**
|
||||
* {@link org.springframework.orm.jpa.JpaDialect} implementation for Hibernate.
|
||||
* Compatible with Hibernate ORM 7.0.
|
||||
* Compatible with Hibernate ORM 7.x.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @author Costin Leau
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ import org.jspecify.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* {@link org.springframework.orm.jpa.JpaVendorAdapter} implementation for Hibernate.
|
||||
* Compatible with Hibernate ORM 7.0.
|
||||
* Compatible with Hibernate ORM 7.x.
|
||||
*
|
||||
* <p>Exposes Hibernate's persistence provider and Hibernate's Session as extended
|
||||
* EntityManager interface, and adapts {@link AbstractJpaVendorAdapter}'s common
|
||||
|
||||
Reference in New Issue
Block a user