Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
d7d9e7d
ci: unify functional test CI to run all tests against both Hibernate …
jamesfredley Apr 7, 2026
e2336d9
fix: register h7 autoconfig and remove h5-specific ehcache config
jamesfredley Apr 7, 2026
f587be1
ci: skip h7-incompatible general tests when running with hibernateVer…
jamesfredley Apr 7, 2026
fbfe66b
fix: make gorm and app1 functional tests H7-compatible
borinquenkid Apr 8, 2026
a458c4a
fix(h7): fix 3 H7 GORM bugs — NonUniqueResultException, aggregate ret…
borinquenkid Apr 8, 2026
707c33d
fix(h7): prevent 'two representations of same collection' in addTo/sa…
borinquenkid Apr 9, 2026
a63dcad
fix(test): correct GormCriteriaQueriesSpec to use safe HQL overloads …
borinquenkid Apr 9, 2026
dc7c4a0
address PR feedback: validate hibernateVersion, rename booleans, fix …
jamesfredley Apr 16, 2026
b92f3d5
Merge remote-tracking branch 'origin/8.0.x-hibernate7' into ci/hibern…
jamesfredley Apr 16, 2026
5a97cbe
fix(ci): substitute grails-bom with grails-hibernate7-bom for H7 func…
jamesfredley Apr 16, 2026
5fa3c96
fix(ci): align hibernate to 7.2.7 and fix grails-bom publication path
jamesfredley Apr 16, 2026
3f8eb79
fix(ci): swap project(':grails-bom') for h7, add micronaut-bom to for…
jamesfredley Apr 16, 2026
b59c548
fix(ci): attach grails-hibernate7-bom platform to test project depend…
jamesfredley Apr 16, 2026
904fd76
fix(ci): pin testcontainers BOM in grails-forge-analytics-postgres
jamesfredley Apr 16, 2026
5db69b2
fix(ci): correct testcontainers artifact name to org.testcontainers:p…
jamesfredley Apr 16, 2026
52ba29e
fix(ci): correct testcontainers spock artifact in grails-forge-cli
jamesfredley Apr 16, 2026
cf6d9ce
chore(forge): move testcontainers version to gradle.properties
jamesfredley Apr 16, 2026
634c9e8
Merge branch '8.0.x-hibernate7' into ci/hibernate-matrix-testing
jamesfredley May 29, 2026
8b7958a
Merge remote-tracking branch 'origin/ci/hibernate-matrix-testing' int…
jamesfredley Jun 11, 2026
62e54ff
Require Hibernate functional checks before publish
jamesfredley Jun 11, 2026
5aaa296
Align Hibernate 7 functional dependency routing
jamesfredley Jun 11, 2026
794ce68
Match Hibernate 7 static finder parity
jamesfredley Jun 11, 2026
6d0aaa5
Apply Hibernate 7 HQL query settings consistently
jamesfredley Jun 11, 2026
b269c00
Restore migrated Hibernate 7 TCK spec wiring
jamesfredley Jun 11, 2026
d4963e7
Fix Hibernate 7 has-many support import
jamesfredley Jun 11, 2026
49c8064
Scan Hibernate 7 multitenancy support package
jamesfredley Jun 11, 2026
74bfe69
Document Hibernate 7 HQL query settings
jamesfredley Jun 11, 2026
fcf88e9
Document Hibernate 7 finder and getAll behavior
jamesfredley Jun 11, 2026
da46aed
Mark H7 GORM bug report historical
jamesfredley Jun 11, 2026
2e02653
Normalize H7 GORM bug report typography
jamesfredley Jun 11, 2026
00b1e05
Address Hibernate 7 review feedback
jamesfredley Jun 11, 2026
fd42df2
Merge branch '8.0.x-hibernate7' into test/h7-functional-coverage
jamesfredley Jun 11, 2026
94efeeb
Resolve Hibernate 7 functional coverage blockers
jamesfredley Jun 12, 2026
a1126fc
docs(h7): mark Bugs 2, 3, 4, and 5 as fixed in report
borinquenkid Jun 12, 2026
b5af3b8
Align Hibernate models with Spring Boot managed ORM
jamesfredley Jun 12, 2026
de0d94a
Align Hibernate 7.4 dependency APIs
jamesfredley Jun 12, 2026
724dab7
Remove Hibernate proxy fallback workaround
jamesfredley Jun 12, 2026
38c0db8
Let Hibernate create simple ID primary keys
jamesfredley Jun 12, 2026
ad00e95
Fix composite ID association column ordering
jamesfredley Jun 12, 2026
36026fc
Update identity generator spec for Hibernate 7.4
jamesfredley Jun 12, 2026
0b867ca
Update event listener spec for Hibernate 7.4
jamesfredley Jun 12, 2026
a5cd019
Document Hibernate 7.4 migration checklist
jamesfredley Jun 12, 2026
7c991ad
refactor: move composite FK sorting logic into HibernatePersistentPro…
borinquenkid Jun 12, 2026
3ee18b8
Refactor generator mapped identity logic in BasicValueCreator
borinquenkid Jun 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,17 @@ jobs:
path: grails-forge/tmp1/cli/**/*
if-no-files-found: 'error'
functional:
name: "Functional Tests (Java ${{ matrix.java }}, indy=${{ matrix.indy }})"
name: "Functional Tests (Java ${{ matrix.java }}, Hibernate ${{ matrix.hibernate-version }}, indy=${{ matrix.indy }})"
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
strategy:
fail-fast: false
matrix:
java: [ 21, 25 ]
hibernate-version: [ '5', '7' ]
indy: [ false ]
include:
- java: 21
hibernate-version: '5'
indy: true
runs-on: ubuntu-24.04
steps:
Expand All @@ -264,6 +266,8 @@ jobs:
- name: "🔍 Setup TestLens"
uses: testlens-app/setup-testlens@d96a555133c275a00949d2cc77b70fe9a4242ebf # v1.9.2
- name: "🏃 Run Functional Tests"
env:
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: >
./gradlew bootJar check
--continue
Expand All @@ -276,6 +280,8 @@ jobs:
-PskipHibernate5Tests
-PskipHibernate7Tests
-PskipMongodbTests
-PhibernateVersion=${{ matrix.hibernate-version }}
-PskipHibernate${{ matrix.hibernate-version == '5' && '7' || '5' }}Tests
mongodbFunctional:
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
name: "Mongodb Functional Tests (Java ${{ matrix.java }}, MongoDB ${{ matrix.mongodb-version }}, indy=${{ matrix.indy }})"
Expand Down Expand Up @@ -436,15 +442,16 @@ jobs:
name: grails-gradle-artifacts.txt
path: grails-gradle/build/grails-gradle-artifacts.txt
publish:
needs: [ publishGradle, build, functional, hibernate5Functional, mongodbFunctional ]
needs: [ publishGradle, build, functional, hibernate5Functional, hibernate7Functional, mongodbFunctional ]
if: >-
${{ always() &&
github.repository_owner == 'apache' &&
(github.event_name == 'push' || github.event_name == 'workflow_dispatch') &&
needs.publishGradle.result == 'success' &&
(needs.build.result == 'success' || needs.build.result == 'skipped') &&
(needs.functional.result == 'success' || needs.functional.result == 'skipped') &&
(needs.hibernate5Functional.result == 'success' || needs.hibernate5Functional.result == 'skipped') &&
(needs.hibernate5Functional.result == 'success' || needs.hibernate5Functional.result == 'skipped') &&
(needs.hibernate7Functional.result == 'success' || needs.hibernate7Functional.result == 'skipped') &&
(needs.mongodbFunctional.result == 'success' || needs.mongodbFunctional.result == 'skipped')
}}
runs-on: ubuntu-24.04
Expand Down
99 changes: 99 additions & 0 deletions H7_GORM_BUG_REPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<!--
SPDX-License-Identifier: Apache-2.0

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

## Historical H7 `gorm` Functional Test Failures - Bug Report

This historical report captured the `grails-test-examples-gorm` failures that drove the Hibernate 7 fixes in this branch. Some entries below have since been fixed by this branch, so treat this file as triage rationale rather than current expected test status.

Before those fixes, running `grails-test-examples-gorm` with `-PhibernateVersion=7` produced 13 failures across 4 specs. Below are the 5 distinct root causes.

---

### Bug 1 (Intentional) - `executeQuery` / `executeUpdate` plain String blocked

| | |
|---|---|
| **Tests** | `test basic HQL query`, `test HQL aggregate functions`, `test HQL group by`, `test executeUpdate for bulk operations` |
| **Spec** | `GormCriteriaQueriesSpec` |
| **Error** | `UnsupportedOperationException: executeQuery(CharSequence) only accepts a Groovy GString with interpolated parameters` |

**Description:** H7 intentionally rejects `executeQuery("from Book where inStock = true")` when no parameters are passed. The same tightening was already applied to `executeUpdate`. Callers must use `executeQuery('...', [:])` or a GString with interpolated params.

> This is by design. The test bodies need to adopt the parameterized form - not a GORM bug.

---

### Bug 2 (Fixed) - `DetachedCriteria.get()` throws `NonUniqueResultException` instead of returning first result

| | |
|---|---|
| **Test** | `test detached criteria as reusable query` |
| **Spec** | `GormCriteriaQueriesSpec:454` |
| **Error** | `jakarta.persistence.NonUniqueResultException: Query did not return a unique result: 2 results were returned` |

**Description:** H5 `DetachedCriteria.get()` returned the first matching row when multiple rows existed. H7's `AbstractSelectionQuery.getSingleResult()` is now strict and throws if the result is not unique.

**Expected fix:** `HibernateQueryExecutor.singleResult()` should apply `setMaxResults(1)` before calling `getSingleResult()`, or switch to `getResultList().stream().findFirst()`.

> **Status:** Fixed. Caught exceptions are updated to check for `jakarta.persistence.NonUniqueResultException` to return the first result, and the tests pass.

---

### Bug 3 (Fixed) - `Found two representations of same collection: gorm.Author.books`

| | |
|---|---|
| **Tests** | `test saving child with belongsTo saves parent reference`, `test dirty checking with associations`, `test belongsTo allows orphan removal`, `test updating multiple children`, `test addTo creates bidirectional link` |
| **Spec** | `GormCascadeOperationsSpec` |
| **Error** | `HibernateSystemException: Found two representations of same collection: gorm.Author.books` |

**Description:** H7 enforces stricter collection identity. After `author.addToBooks(book); author.save(flush: true)`, the session contains two references to the same `Author.books` collection, causing a `HibernateException` on flush. H5 tolerated this.

**Expected fix:** GORM's `addTo*` / cascade-flush path in `grails-data-hibernate7` must synchronize both sides of the bidirectional association and merge/evict stale collection snapshots before flushing.

> **Status:** Fixed. Cascade flush issues and collection representations are now resolved, and `GormCascadeOperationsSpec` passes 100%.

---

### Bug 4 (Fixed) - `@Query` aggregate functions fail with type mismatch

| | |
|---|---|
| **Tests** | `test findAveragePrice`, `test findMaxPageCount` |
| **Spec** | `GormDataServicesSpec` |
| **Errors** | `Incorrect query result type: query produces 'java.lang.Double' but type 'java.lang.Long' was given` / `query produces 'java.lang.Integer' but type 'java.lang.Long' was given` |

**Description:** `HibernateHqlQuery.buildQuery()` always calls `session.createQuery(hql, ctx.targetClass())`. For aggregate HQL (`select avg(b.price) ...`, `select max(b.pageCount) ...`), the query does not return an entity, but `ctx.targetClass()` returns the entity class (e.g., `Book`). H7's `SqmQueryImpl` enforces strict result-type alignment: `avg()` produces `Double`, `max(pageCount)` produces `Integer`, neither is coercible to the bound entity type.

**Expected fix:** `HibernateHqlQuery.buildQuery()` must detect non-entity HQL (aggregates / projections) and call the untyped `session.createQuery(hql)` in those cases, letting GORM handle result casting downstream.

> **Status:** Fixed. Aggregate return types are now dynamically resolved, matching the expected Java type of the aggregate function itself.

---

### Bug 5 (Fixed) - `where { pageCount > price * 10 }` fails with `CoercionException`

| | |
|---|---|
| **Test** | `test where query comparing two properties` |
| **Spec** | `GormWhereQueryAdvancedSpec:175` |
| **Error** | `org.hibernate.type.descriptor.java.CoercionException: Error coercing value` |

**Description:** A where-DSL closure comparing an `Integer` property (`pageCount`) to an arithmetic expression involving a `BigDecimal` property (`price * 10`) worked in H5. H7's SQM type system no longer allows implicit coercion between `Integer` and `BigDecimal` in a comparison predicate.

**Expected fix:** The GORM where-query-to-SQM translator should emit an explicit `CAST` in the SQM tree when the two operands of a comparison have different numeric types.

> **Status:** Fixed. Type coercion in comparison predicates is now handled, and `GormWhereQueryAdvancedSpec` passes 100%.
20 changes: 12 additions & 8 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,11 @@ ext {
customBomVersions = [
'cache-ri-impl.version' : '1.1.1',
'derby.version' : '10.17.1.0',
'hibernate-models.version' : '1.0.1',
'hibernate.version' : '7.2.5.Final',
// Spring Boot 4.1 can select Hibernate ORM 7.4.x through Spring Dependency
// Management, and Hibernate ORM 7.4.x requires hibernate-models 1.1.x.
'hibernate-models.version' : '1.1.1',
'hibernate-tools.version' : '7.3.8.Final',
'hibernate.version' : '7.4.1.Final',
'jandex.version' : '3.2.3',
'liquibase-hibernate.version' : '4.27.0',
'liquibase-test-harness.version': '1.0.11',
Expand All @@ -239,8 +242,8 @@ ext {
'hibernate-envers' : "org.hibernate.orm:hibernate-envers:${combinedVersions['hibernate.version']}",
'hibernate-jcache' : "org.hibernate.orm:hibernate-jcache:${combinedVersions['hibernate.version']}",
'hibernate-models' : "org.hibernate.models:hibernate-models:${combinedVersions['hibernate-models.version']}",
'hibernate-tools-orm' : "org.hibernate.tool:hibernate-tools-orm:${combinedVersions['hibernate.version']}",
'hibernate-tools-utils' : "org.hibernate.tool:hibernate-tools-utils:${combinedVersions['hibernate.version']}",
'hibernate-tools-orm' : "org.hibernate.tool:hibernate-tools-orm:${combinedVersions['hibernate-tools.version']}",
'hibernate-tools-utils' : "org.hibernate.tool:hibernate-tools-utils:${combinedVersions['hibernate-tools.version']}",
'jandex' : "io.smallrye:jandex:${combinedVersions['jandex.version']}",
'liquibase' : "org.liquibase:liquibase:${combinedVersions['liquibase.version']}",
'liquibase-cdi' : "org.liquibase:liquibase-cdi:${combinedVersions['liquibase.version']}",
Expand Down Expand Up @@ -313,8 +316,9 @@ ext {
customBomVersions = [
'cache-ri-impl.version' : '1.1.1',
'groovy.version' : '5.0.5',
'hibernate-models.version' : '1.0.1',
'hibernate.version' : '7.2.5.Final',
'hibernate-models.version' : '1.1.1',
'hibernate-tools.version' : '7.3.8.Final',
'hibernate.version' : '7.4.1.Final',
'jandex.version' : '3.2.3',
'liquibase-hibernate.version' : '4.27.0',
'liquibase-test-harness.version': '1.0.11',
Expand Down Expand Up @@ -360,8 +364,8 @@ ext {
'hibernate-envers' : "org.hibernate.orm:hibernate-envers:${combinedVersions['hibernate.version']}",
'hibernate-jcache' : "org.hibernate.orm:hibernate-jcache:${combinedVersions['hibernate.version']}",
'hibernate-models' : "org.hibernate.models:hibernate-models:${combinedVersions['hibernate-models.version']}",
'hibernate-tools-orm' : "org.hibernate.tool:hibernate-tools-orm:${combinedVersions['hibernate.version']}",
'hibernate-tools-utils' : "org.hibernate.tool:hibernate-tools-utils:${combinedVersions['hibernate.version']}",
'hibernate-tools-orm' : "org.hibernate.tool:hibernate-tools-orm:${combinedVersions['hibernate-tools.version']}",
'hibernate-tools-utils' : "org.hibernate.tool:hibernate-tools-utils:${combinedVersions['hibernate-tools.version']}",
'jandex' : "io.smallrye:jandex:${combinedVersions['jandex.version']}",
'liquibase' : "org.liquibase:liquibase:${combinedVersions['liquibase.version']}",
'liquibase-cdi' : "org.liquibase:liquibase-cdi:${combinedVersions['liquibase.version']}",
Expand Down
83 changes: 81 additions & 2 deletions gradle/functional-test-config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,46 @@ rootProject.subprojects
.findAll { !(it.name in testProjects) && !(it.name in docProjects) && !(it.name in cliProjects) }
.each { project.evaluationDependsOn(it.path) }

// Determine which Hibernate version to use for general functional tests.
// Pass -PhibernateVersion=7 to run general functional tests against Hibernate 7 instead of 5.
// Only '5' and '7' are supported; any other value fails the build fast to catch typos.
def targetHibernateVersion = (project.findProperty('hibernateVersion') ?: '5').toString()
if (!(targetHibernateVersion in ['5', '7'])) {
throw new GradleException(
"Unsupported hibernateVersion '${targetHibernateVersion}'. Expected '5' or '7'.")
}
boolean isHibernate5LabeledProject = project.name.startsWith('grails-test-examples-hibernate5')
boolean isHibernate7LabeledProject = project.name.startsWith('grails-test-examples-hibernate7')
boolean isHibernateSpecificProject = isHibernate5LabeledProject || isHibernate7LabeledProject
boolean isMongoProject = project.name.startsWith('grails-test-examples-mongodb')
boolean isGeneralFunctionalTest = !isHibernateSpecificProject && !isMongoProject

// General functional test projects that cannot run under Hibernate 7 via dependency substitution.
// The datasources project has partial H7-compatible coverage in
// grails-test-examples/hibernate7/grails-multiple-datasources, but still includes H5-only
// coverage that needs explicit H7 duplicates before the general project can be enabled.
// The app1 and GraphQL functional projects currently fail under H7 substitution and need
// dedicated H7 follow-up coverage before they can be enabled in this lane.
// The views and scaffolding projects boot with H7 substitution, but their functional specs
// currently fail on association rendering and unique-constraint behavior under Hibernate 7.
List<String> h7IncompatibleProjects = [
'grails-test-examples-app1',
'grails-test-examples-datasources',
'grails-test-examples-graphql-grails-docs-app',
'grails-test-examples-graphql-grails-multi-datastore-app',
'grails-test-examples-graphql-grails-tenant-app',
'grails-test-examples-graphql-grails-test-app',
'grails-test-examples-graphql-spring-boot-app',
'grails-test-examples-views-functional-tests',
'grails-test-examples-scaffolding-fields',
]

// Redirect the default grails-bom to grails-hibernate7-bom for general functional tests when
// running with -PhibernateVersion=7, so consumers get the Hibernate 7 version constraints
// (hibernate.version=7.2.7.Final and related). The default grails-bom and grails-hibernate5-bom
// ship the Hibernate 5 constraints.
def redirectBomToH7 = isGeneralFunctionalTest && targetHibernateVersion == '7' && !(project.name in h7IncompatibleProjects)

configurations.configureEach {
resolutionStrategy.dependencySubstitution {
// Test projects will often include dependencies from local projects. This will ensure any dependencies
Expand All @@ -32,7 +72,8 @@ configurations.configureEach {
//TODO: This does not handle libraries that are both test fixtures & a libraries like grails-data-mongodb,
// see grails-test-examples-mongodb-base, & grails-test-examples-mongodb-hibernate5 for project() workaround
if (possibleProject.name == 'grails-bom') {
substitute module(substitutedArtifact) using platform(project(':grails-bom'))
def targetBom = redirectBomToH7 ? ':grails-hibernate7-bom' : ':grails-bom'
substitute module(substitutedArtifact) using platform(project(targetBom))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@borinquenkid my issue is this file, specifically this substitution.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Hey @jdaugherty, that makes total sense. In an OSS context, hidden classpath manipulation like this easily rots if left unchecked, and I agree we don't want people troubleshooting brittle IDE syncs locally.

Here is compromise so we can hit our end-of-June release target for Hibernate 7 parity without abandoning your architectural goal:

Fail-Safe Logging: I will add an explicit, loud deprecation warning or a hardcoded TODO block directly above this substitution in functional-test-config.gradle tracking its removal.

Immediate Post-Release Issue: I'll open a tracking issue right now to completely untangle this layer by cloning the apps into a clean directory structure.

Given that I want to completely drop Hibernate 5 support in the near future anyway, duplicating the entire H5 test matrix right this second might end up being throwaway work. Can we use this substitution as a temporary bridge to unblock the June release gate, with the explicit agreement that the cleanup issue is the immediate next priority?"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm strongly a -1 on this. People will just ignore the depreciation and it doesn't solve our actual problem. The majority of the work I've done with Grails is dependency debugging - probably over 50% of my time has been spent on it. This completely breaks that workflow. By substituting arbitrarily, we now have to populate that option throughout our workflows to be able to debug.

}
else if(possibleProject.name == 'grails-geb') {
def selector = it.variant(module(substitutedArtifact)) { VariantSelectionDetails details ->
Expand All @@ -51,6 +92,44 @@ configurations.configureEach {
}
}
}

// For general (non-hibernate-labeled) functional test projects, redirect Hibernate 5 dependencies
// to Hibernate 7 projects when -PhibernateVersion=7 is set. These rules are added after the loop
// so they override the default substitutions for the h5 modules.
// Projects in h7IncompatibleProjects are excluded since they use H5-specific GORM APIs.
if (redirectBomToH7) {
substitute module('org.apache.grails:grails-data-hibernate5') using project(':grails-data-hibernate7')
substitute module('org.apache.grails:grails-data-hibernate5-spring-boot') using project(':grails-data-hibernate7-spring-boot')
}
}

// Exclude Hibernate 5-specific runtime dependencies when testing general projects with Hibernate 7.
// These libraries have no Hibernate 7 equivalent and would cause classpath conflicts.
if (isGeneralFunctionalTest && targetHibernateVersion == '7' && !(project.name in h7IncompatibleProjects)) {
exclude group: 'org.hibernate', module: 'hibernate-ehcache'
exclude group: 'org.jboss.spec.javax.transaction', module: 'jboss-transaction-api_1.3_spec'
}
}

// For general functional test projects running against Hibernate 7, attach the Hibernate 7 BOM as a
// platform on the dependency buckets the test projects use. The test project's own build.gradle
// imports platform(project(':grails-bom')) which lacks Hibernate 7 version constraints
// (hibernate-models, jandex, hibernate-tools-orm, etc.). Attaching the H7 BOM here means we don't
// have to edit each test project's build.gradle, and the H7 constraints take precedence because the
// dependency-substitution above already swaps grails-data-hibernate5 -> grails-data-hibernate7 in
// the same path.
if (isGeneralFunctionalTest && targetHibernateVersion == '7' && !(project.name in h7IncompatibleProjects)) {
def addH7Platform = { String confName ->
def conf = configurations.findByName(confName)
if (conf != null) {
conf.dependencies.add(dependencies.platform(dependencies.project(path: ':grails-hibernate7-bom')))
}
}
plugins.withId('java') {
['implementation', 'compileOnly', 'runtimeOnly',
'testImplementation', 'testCompileOnly', 'testRuntimeOnly',
'integrationTestImplementation', 'integrationTestRuntimeOnly',
'testAndDevelopmentOnly'].each(addH7Platform)
}
}

Expand Down Expand Up @@ -147,4 +226,4 @@ tasks.withType(Test).configureEach { Test task ->
tasks.named('groovydoc').configure {
// We don't need to generate docs for test projects
enabled = false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@

package grails.gorm.tests

import org.jetbrains.annotations.NotNull

import grails.gorm.annotation.Entity
import grails.gorm.specs.HibernateGormDatastoreSpec

import jakarta.annotation.Nonnull

import static grails.gorm.hibernate.mapping.MappingBuilder.define

Expand Down Expand Up @@ -70,7 +71,7 @@ class CompositeIdParent implements Serializable, Comparable<CompositeIdParent> {
}

@Override
int compareTo(@NotNull CompositeIdParent o) {
int compareTo(@Nonnull CompositeIdParent o) {
this.name <=> o.name ?: this.last <=> o.last
}
}
Expand All @@ -90,4 +91,4 @@ class CompositeIdChild implements Comparable<CompositeIdChild> {
int compareTo(CompositeIdChild other) {
foo <=> other.foo
}
}
}
Loading
Loading