Skip to content

Commit

Permalink
[hibernate#1930] Update Hibernate ORM to 6.6.0.Alpha1
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideD committed Jul 11, 2024
1 parent ee4f002 commit ae4bca3
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Hibernate Reactive has been tested with:
- CockroachDB v24
- MS SQL Server 2022
- Oracle 23
- [Hibernate ORM][] 6.5.2.Final
- [Hibernate ORM][] 6.6.0.Alpha1
- [Vert.x Reactive PostgreSQL Client](https://vertx.io/docs/vertx-pg-client/java/) 4.5.7
- [Vert.x Reactive MySQL Client](https://vertx.io/docs/vertx-mysql-client/java/) 4.5.7
- [Vert.x Reactive Db2 Client](https://vertx.io/docs/vertx-db2-client/java/) 4.5.7
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ version = projectVersion
// ./gradlew clean build -PhibernateOrmVersion=5.6.15-SNAPSHOT
ext {
if ( !project.hasProperty('hibernateOrmVersion') ) {
hibernateOrmVersion = '6.5.2.Final'
hibernateOrmVersion = '6.6.0.Alpha1'
}
if ( !project.hasProperty( 'hibernateOrmGradlePluginVersion' ) ) {
// Same as ORM as default
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@ org.gradle.java.installations.auto-download=false
#db = MSSQL

# Enable the SonatypeOS maven repository (mainly for Vert.x snapshots) when present (value ignored)
enableSonatypeOpenSourceSnapshotsRep = true
#enableSonatypeOpenSourceSnapshotsRep = true

# Enable the maven local repository (for local development when needed) when present (value ignored)
#enableMavenLocalRepo = true

# Override default Hibernate ORM version
hibernateOrmVersion = [6.4,6.6)
#hibernateOrmVersion = 6.6.0.Alpha1

# Override default Hibernate ORM Gradle plugin version
# Using the stable version because I don't know how to configure the build to download the snapshot version from
# a remote repository
#hibernateOrmGradlePluginVersion = 6.5.2.Final
#hibernateOrmGradlePluginVersion = 6.6.0.Alpha1

# If set to true, skip Hibernate ORM version parsing (default is true, if set to null)
# this is required when using intervals or weird versions or the build will fail
skipOrmVersionParsing = true
#skipOrmVersionParsing = true

# Override default Vert.x Sql client version
#vertxSqlClientVersion = 4.5.7-SNAPSHOT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,15 @@ protected EntityFetch buildEntityDelayedFetch(
ToOneAttributeMapping fetchedAttribute,
NavigablePath navigablePath,
DomainResult<?> keyResult,
boolean selectByUniqueKey) {
boolean selectByUniqueKey,
DomainResultCreationState creationState) {
return new ReactiveEntityDelayedFetchImpl(
fetchParent,
fetchedAttribute,
navigablePath,
keyResult,
selectByUniqueKey
selectByUniqueKey,
creationState
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.hibernate.spi.NavigablePath;
import org.hibernate.sql.results.graph.DomainResultAssembler;
import org.hibernate.sql.results.graph.FetchParentAccess;
import org.hibernate.sql.results.graph.basic.BasicResultAssembler;
import org.hibernate.sql.results.graph.entity.internal.EntityDelayedFetchInitializer;
import org.hibernate.type.Type;

Expand All @@ -38,8 +39,9 @@ public ReactiveEntityDelayedFetchInitializer(
NavigablePath fetchedNavigable,
ToOneAttributeMapping referencedModelPart,
boolean selectByUniqueKey,
DomainResultAssembler<?> identifierAssembler) {
super( parentAccess, fetchedNavigable, referencedModelPart, selectByUniqueKey, identifierAssembler );
DomainResultAssembler<?> identifierAssembler,
BasicResultAssembler<?> discriminatorAssembler) {
super( parentAccess, fetchedNavigable, referencedModelPart, selectByUniqueKey, identifierAssembler, discriminatorAssembler );
this.referencedModelPart = referencedModelPart;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
import org.hibernate.spi.NavigablePath;
import org.hibernate.sql.results.graph.AssemblerCreationState;
import org.hibernate.sql.results.graph.DomainResult;
import org.hibernate.sql.results.graph.DomainResultCreationState;
import org.hibernate.sql.results.graph.FetchParent;
import org.hibernate.sql.results.graph.FetchParentAccess;
import org.hibernate.sql.results.graph.basic.BasicResultAssembler;
import org.hibernate.sql.results.graph.entity.EntityInitializer;
import org.hibernate.sql.results.graph.entity.internal.EntityDelayedFetchImpl;

Expand All @@ -21,20 +23,22 @@ public ReactiveEntityDelayedFetchImpl(
ToOneAttributeMapping fetchedAttribute,
NavigablePath navigablePath,
DomainResult<?> keyResult,
boolean selectByUniqueKey) {
super( fetchParent, fetchedAttribute, navigablePath, keyResult, selectByUniqueKey );
boolean selectByUniqueKey,
DomainResultCreationState creationState) {
super( fetchParent, fetchedAttribute, navigablePath, keyResult, selectByUniqueKey, creationState );
}

@Override
public EntityInitializer createInitializer(FetchParentAccess parentAccess, AssemblerCreationState creationState) {
return new ReactiveEntityDelayedFetchInitializer( parentAccess,
getNavigablePath(),
getEntityValuedModelPart(),
isSelectByUniqueKey(),
getKeyResult().createResultAssembler(
parentAccess,
creationState
)
return new ReactiveEntityDelayedFetchInitializer(
parentAccess,
getNavigablePath(),
getEntityValuedModelPart(),
isSelectByUniqueKey(),
getKeyResult().createResultAssembler( parentAccess, creationState ),
getDiscriminatorFetch() != null
? (BasicResultAssembler<?>) getDiscriminatorFetch().createResultAssembler( parentAccess, creationState )
: null
);
}
}

0 comments on commit ae4bca3

Please sign in to comment.