Skip to content

Commit

Permalink
Upgrade to Hibernate ORM 6.4.0.CR1
Browse files Browse the repository at this point in the history
  • Loading branch information
yrodiere committed Nov 3, 2023
1 parent 7d5952e commit 68c3d49
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 5 deletions.
4 changes: 2 additions & 2 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
bytebuddy.version (just below), hibernate-orm.version-for-documentation (in docs/pom.xml)
and antlr.version.version in build-parent/pom.xml
WARNING again for diffs that don't provide enough context: when updating, see above -->
<hibernate-orm.version>6.3.1.Final</hibernate-orm.version>
<hibernate-orm.version>6.4.0.CR1</hibernate-orm.version>
<bytebuddy.version>1.14.7</bytebuddy.version> <!-- Version controlled by Hibernate ORM's needs -->
<hibernate-commons-annotations.version>6.0.6.Final</hibernate-commons-annotations.version> <!-- version controlled by Hibernate ORM -->
<hibernate-reactive.version>2.0.6.Final</hibernate-reactive.version>
Expand Down Expand Up @@ -190,7 +190,7 @@
<quarkus-spring-boot-api.version>2.1.SP1</quarkus-spring-boot-api.version>
<mockito.version>5.3.1</mockito.version>
<jna.version>5.8.0</jna.version><!-- should satisfy both testcontainers and mongodb -->
<antlr.version>4.10.1</antlr.version><!-- needs to align with same property in build-parent/pom.xml -->
<antlr.version>4.13.0</antlr.version><!-- needs to align with same property in build-parent/pom.xml -->
<quarkus-security.version>2.0.2.Final</quarkus-security.version>
<keycloak.version>22.0.5</keycloak.version>
<logstash-gelf.version>1.15.1</logstash-gelf.version>
Expand Down
2 changes: 1 addition & 1 deletion build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<!-- MicroProfile TCK versions used to be defined here but have moved to the concrete tck modules -->

<!-- Antlr 4 is used by the PanacheQL parser but also needs to match the requirements of Hibernate ORM 6.x-->
<antlr.version>4.10.1</antlr.version>
<antlr.version>4.13.0</antlr.version>

<!-- SELinux access label, used when mounting local volumes into containers in tests -->
<volume.access.modifier>:Z</volume.access.modifier>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ private HibernateOrmTypes() {
DotName.createSimple("org.hibernate.annotations.NamedNativeQuery"),
DotName.createSimple("org.hibernate.annotations.NamedQueries"),
DotName.createSimple("org.hibernate.annotations.NamedQuery"),
DotName.createSimple("org.hibernate.annotations.SoftDelete"),
DotName.createSimple("org.hibernate.annotations.TypeRegistration"),
DotName.createSimple("org.hibernate.annotations.TypeRegistrations"));

Expand Down Expand Up @@ -301,6 +302,7 @@ private HibernateOrmTypes() {
DotName.createSimple("org.hibernate.annotations.SecondaryRow"),
DotName.createSimple("org.hibernate.annotations.SecondaryRows"),
DotName.createSimple("org.hibernate.annotations.SelectBeforeUpdate"),
DotName.createSimple("org.hibernate.annotations.SoftDelete"),
DotName.createSimple("org.hibernate.annotations.SortComparator"),
DotName.createSimple("org.hibernate.annotations.SortNatural"),
DotName.createSimple("org.hibernate.annotations.Source"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ public String getTenantIdentifier() {
return delegate.get().getTenantIdentifier();
}

@Override
public Object getTenantIdentifierValue() {
return delegate.get().getTenantIdentifier();
}

@Override
public boolean isOpen() {
return delegate.get().isOpen();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1142,6 +1142,13 @@ public String getTenantIdentifier() {
}
}

@Override
public Object getTenantIdentifierValue() {
try (SessionResult emr = acquireSession()) {
return emr.session.getTenantIdentifierValue();
}
}

@Override
public boolean isConnected() {
checkBlocking();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,13 @@ public String getTenantIdentifier() {
}
}

@Override
public Object getTenantIdentifierValue() {
try (SessionResult emr = acquireSession()) {
return emr.statelessSession.getTenantIdentifierValue();
}
}

@Override
public boolean isConnected() {
checkBlocking();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
* @author Michael Schnell
*
*/
public final class HibernateCurrentTenantIdentifierResolver implements CurrentTenantIdentifierResolver {
// TODO support other tenant ID types than String; see https://github.com/quarkusio/quarkus/issues/36831
public final class HibernateCurrentTenantIdentifierResolver implements CurrentTenantIdentifierResolver<String> {

private static final Logger LOG = Logger.getLogger(HibernateCurrentTenantIdentifierResolver.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*
* @author Michael Schnell
*/
public final class HibernateMultiTenantConnectionProvider extends AbstractMultiTenantConnectionProvider {
// TODO support other tenant ID types than String; see https://github.com/quarkusio/quarkus/issues/36831
public final class HibernateMultiTenantConnectionProvider extends AbstractMultiTenantConnectionProvider<String> {

private static final Logger LOG = Logger.getLogger(HibernateMultiTenantConnectionProvider.class);

Expand Down

0 comments on commit 68c3d49

Please sign in to comment.