parent
8f1ade55d9
commit
876b7d4209
|
|
@ -10,11 +10,11 @@ cover the other ORM technologies and show brief examples.
|
|||
|
||||
[NOTE]
|
||||
====
|
||||
As of Spring Framework 7.0, Spring requires Hibernate ORM 7.0 for Spring's
|
||||
`HibernateJpaVendorAdapter` as well as for a native Hibernate `SessionFactory` setup.
|
||||
As of Spring Framework 7.0, Spring requires Hibernate ORM 7.x for Spring's
|
||||
`HibernateJpaVendorAdapter`.
|
||||
|
||||
The `org.springframework.orm.jpa.hibernate` package supersedes the former `orm.hibernate5`:
|
||||
now for use with Hibernate ORM 7.0, tightly integrated with `HibernateJpaVendorAdapter`
|
||||
now for use with Hibernate ORM 7.1+, tightly integrated with `HibernateJpaVendorAdapter`
|
||||
as well as supporting Hibernate's native `SessionFactory.getCurrentSession()` style.
|
||||
====
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ dependencies {
|
|||
api("org.glassfish:jakarta.el:4.0.2")
|
||||
api("org.graalvm.sdk:graal-sdk:22.3.1")
|
||||
api("org.hamcrest:hamcrest:3.0")
|
||||
api("org.hibernate.orm:hibernate-core:7.0.5.Final")
|
||||
api("org.hibernate.orm:hibernate-core:7.1.0.Final")
|
||||
api("org.hibernate.validator:hibernate-validator:9.0.1.Final")
|
||||
api("org.hsqldb:hsqldb:2.7.4")
|
||||
api("org.htmlunit:htmlunit:4.13.0")
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue