Skip to content

Hibernate 7 - Step 2 - #15568

Merged
jamesfredley merged 1425 commits into
8.0.xfrom
8.0.x-hibernate7
Jun 25, 2026
Merged

Hibernate 7 - Step 2#15568
jamesfredley merged 1425 commits into
8.0.xfrom
8.0.x-hibernate7

Conversation

@jdaugherty

@jdaugherty jdaugherty commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Hibernate 7.4 Breaking Changes (Application Migration)

These are the Hibernate 7.4 behaviours that differ from Hibernate 5.6 and remain the application owner's responsibility when migrating from the Hibernate 5 plugin to Hibernate 7. GORM-facing issues that this PR already resolves are intentionally omitted - only the breaking changes that survive are listed.

Status Area Hibernate 5.6 behavior Hibernate 7.4 behavior What can break in applications Application migration action
Remaining app migration item Hibernate module dependencies Applications commonly depend on Hibernate 5 aligned Grails artifacts and constraints. Applications must resolve the Hibernate 7 aligned artifacts and constraints together. Mixing grails-data-hibernate5, H5 BOM constraints, or H5-only transitive dependencies with the H7 runtime can fail dependency resolution or application boot. Use the Hibernate 7 BOM/artifacts consistently. Do not mix H5 and H7 GORM/Hibernate artifacts in the same application runtime.
Remaining app migration item H5-specific cache setup H5 applications may rely on Ehcache/Hibernate 5 cache integration and related configuration. H7 no longer supports the same H5-specific cache integration path. Boot can fail before application code runs when H5 cache classes or region-factory settings are still configured. Remove H5-specific cache dependencies and configuration. Reintroduce caching only with H7-compatible cache providers and settings.
Intentional behavior change Property-map query keys H5-era code could accidentally rely on permissive interpolation of property-map keys. The H7 path validates keys against real domain properties before generating HQL. Code that passes computed, misspelled, or HQL-fragment-like keys to findWhere or findAllWhere now fails fast. Pass only real domain property names as map keys. Move dynamic predicates to criteria, where queries, or explicit HQL with bound parameters.
Documented behavior change Locking and query cache H5-era code may combine cacheable query settings with lock settings. H7 locked queries are not query-cacheable; this PR disables query caching when lock: true is used. Code expecting a locked query to use the query cache will behave differently. Do not rely on query cache for pessimistically locked queries. Treat locked queries as database reads requiring fresh row state.
Remaining app migration item Read-only entity collections H5 could allow collection mutation even when the owning entity was loaded read-only. H7.3 and later mark collections owned by read-only entities as read-only too. Mutating a collection on a read-only entity can now fail. Reload the entity in a writable session before changing its collections. Do not mutate associations on read-only entities.
Remaining app migration item Timeout exception type H5 and earlier H7 lines commonly exposed QueryTimeoutException or LockTimeoutException for query and lock timeout paths. H7.3 and later may throw PersistenceException when the database marks the transaction for rollback. Timeout handling that catches only the narrower exception types can miss rollback-producing timeout failures. Catch PersistenceException around direct Hibernate/JPA timeout-sensitive code and inspect the cause when necessary.
Remaining app migration item Native SQL temporal values H5 native queries commonly returned java.sql temporal values. Hibernate 7 native SQL queries return java.time temporal values by default. Native SQL result handling can fail if it casts to java.sql.Date, Time, or Timestamp. Update result handling to java.time types, or set hibernate.query.native.prefer_jdbc_datetime_types=true during migration.
Remaining app migration item Version-column DDL H5 schema export did not necessarily declare version columns not null by default. H7.3 declares @Version columns not null by default. Schema validation or generated migration diffs can show new not-null constraints on version columns. Validate generated DDL against existing schemas before using dbCreate=update, especially for legacy nullable version columns.
Remaining app migration item General DDL generation H5 generated different column definitions for several mappings. H7 changes generated DDL for mappings including char/Character, Oracle floating point, @ElementCollection sets, @CreationTimestamp, @UpdateTimestamp, and Oracle 23c LOB columns. Automatic schema update can propose or apply unexpected column, constraint, or LOB storage changes. Prefer explicit database migrations for production schemas. Compare generated DDL in staging before using schema update tooling.
Remaining app migration item Schema actions and import.sql Schema actions could be skipped when no entities were mapped. H7.3 and later process schema actions even when no entities are mapped. An accidental import.sql on the classpath can run where it was previously ignored. Remove accidental import.sql files from the runtime classpath or make schema-generation settings explicit.
Remaining app migration item MySQL default fetch depth H5 and earlier Hibernate lines could apply a MySQL dialect-level hibernate.max_fetch_depth=2 default. H7.4 removes that MySQL-specific default. Applications relying on the implicit MySQL fetch depth can see different association fetch plans. Set hibernate.max_fetch_depth explicitly if the application relies on that behavior.
Remaining app migration item Fetch joins with limits H5 commonly handled collection fetch-join limits in memory. H7.4 applies pagination or limits with collection fetch joins in SQL. Queries combining max/offset or limits with collection fetch joins can return a different row/window shape. Review those queries and set the org.hibernate.limitInMemory query hint only when the previous in-memory behavior is required.
Remaining app migration item Oracle HQL date expressions Oracle current date and local date could preserve a time component because Oracle has no true date-only function. H7.4 translates them to trunc(current_date). Oracle HQL predicates depending on the time part can behave differently. Review Oracle queries that use current date or local date and change the expression if a timestamp is required.
Remaining app migration item Eager @Any mappings Eager @Any mappings were loaded by a separate select. H7.4 join-fetches eager @Any associations when loading an entity by id. Direct Hibernate @Any mappings can produce different SQL shape and row width. Review direct Hibernate @Any mappings for performance and row duplication implications.
Remaining app migration item Spanner PostgreSQL dialect Spanner PostgreSQL dialect lived in hibernate-community-dialects under org.hibernate.community.dialect. H7.4 moves it into hibernate-core under org.hibernate.dialect. Explicit dialect configuration can reference a class that is no longer correct. Use org.hibernate.dialect.SpannerPostgreSQLDialect or rely on automatic dialect resolution.
Remaining app migration item Envers NOT_AUDITED associations H5-era Envers behavior could read the associated target from its audit table even when NOT_AUDITED was requested. H7.3 respects RelationTargetAuditMode.NOT_AUDITED. Historic audit reads can return the current associated entity instead of a historic row. Verify Envers audit queries that use RelationTargetAuditMode.NOT_AUDITED.
Remaining app migration item Programmatic datastore package scanning H5 test/application setups may accidentally scan a package that still found needed classes. H7 tests exposed that the datastore must scan the package containing the actual support domains/services. Programmatic HibernateDatastore setup can miss domain or service classes if the scanned package is wrong. When constructing datastores manually, pass the package that contains the domain/service classes, not merely the spec or caller package.

Reopening. This PR replaces #15530

Please note that I split off a prerequisite PR #15654

This allows us to better see what changed between hibernate 5 & 7 - otherwise the hibernate 7 code looks like it was just added instead of changed. Commit a47d8cb is the original commit prior to this split if we need to compare this branch to that for any reason (mistakes, etc).

@jdaugherty jdaugherty mentioned this pull request Apr 10, 2026
@jdaugherty
jdaugherty changed the base branch from 7.0.x to 8.0.x April 10, 2026 14:02
@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@jdaugherty

Copy link
Copy Markdown
Contributor Author

FYI: I added this comment due to the micronaut mismatches. I'll add a work around for this for now (no javadoc so it's probably ok to force api compatibility). Hopefully they update on the micronaut side so there aren't any issues.

@jdaugherty

Copy link
Copy Markdown
Contributor Author

Running this locally, I only had 1 test failure:

image

Which was due to OOM.

@jdaugherty

Copy link
Copy Markdown
Contributor Author

@borinquenkid can you take a look at that failure?

@borinquenkid

Copy link
Copy Markdown
Member

@jdaugherty I created a local task not checked in and needed this setup to run relaibli sub.tasks.withType(Test).configureEach { t -> │
│ t.maxParallelForks = 1 │
│ t.maxHeapSize = "3g" │
│ t.jvmArgs("-XX:MaxMetaspaceSize=512m") │
│ t.forkEvery = 1 │
│ }

@jdaugherty

Copy link
Copy Markdown
Contributor Author

Still TODO:

  1. I need to understand why micronaut was choosing the wrong version of test containers (reason we put it in the bom)
  2. need to take another pass at the out of tree updates
  3. need to review hibernate / final PR state (may recreate in that case)

@jdaugherty

Copy link
Copy Markdown
Contributor Author

@borinquenkid the latest round seems to have broken a lot of tests. Can you please take a look? I'd like to do another pass at this PR when you're done so we can actually review this functionality.

@borinquenkid

Copy link
Copy Markdown
Member

I reset hard some of the changes because they touched core which affects other modules.
Here is an assessment of the limitations:

GORM Scalability Analysis & Multi-Tenancy Risk Profile

Metric Safe Operating Range High Risk Range Critical Failure
Total Domain Classes < 150 150 - 300 > 500
Total Tenants < 200 200 - 500 > 1,000
Total API Objects < 30,000 30k - 50,000 > 100,000

Summary for June Release

  • Suitability: Current code is stable for small-to-medium applications but NOT supported for Dynamic Schema SaaS due to the lack of tenant eviction/lifecycle management.
  • Mandatory Requirement: To achieve production-grade stability for June, the architecture must transition to a Class-Singleton Orchestrator where API instances are shared across all tenants.
  • Safety Ceiling: The 50,000 API object ceiling must be re-implemented as a mandatory safety gate until the orchestrator transition is complete.

@jdaugherty

Copy link
Copy Markdown
Contributor Author

TODO:

  1. reduce memory back down
  2. fix rat issues
  3. @jdaugherty to take 1 last pass before review
  4. do the review on hibernate 7

@jdaugherty

Copy link
Copy Markdown
Contributor Author

My bom changes are really separate from this review. They fix a critical mistake in 7.0.x - you have to still override the hibernate 5 version instead of just using the bom. I'm going to look at pulling those changes out of this review so that the review is focused on hibernate alone.

@jdaugherty

Copy link
Copy Markdown
Contributor Author

This PR is currently blocked by #15605

Once that PR is merged, we will merge it up and then into this PR

@jdaugherty

Copy link
Copy Markdown
Contributor Author

I need to split the micronaut bom into a hibernate5 & hibernate7 version as a next step. Will wait for this PR's latest round of tests to finish to see if anything else is missing.

@borinquenkid Please note that I removed testcontainers bom from our bom - we're inheriting from Spring and that's being included. The validateDependencyVersions task ensures that our bom matches the versions being imported and Spring by default imports 2.0.5 (see https://central.sonatype.com/artifact/org.springframework.boot/spring-boot-dependencies/4.0.6)

@jdaugherty

Copy link
Copy Markdown
Contributor Author

FYI: I think I found out why testcontainers kept getting added to the boms - grails-forge is a micronaut app that still needs the older version. I've updated the micronaut dependencies to pull from the forge bom instead.

@borinquenkid

borinquenkid commented May 3, 2026 via email

Copy link
Copy Markdown
Member

@jdaugherty

Copy link
Copy Markdown
Contributor Author

@borinquenkid FYI: the forge tests are passing with the changes. All of the grails projects are using the newer version from the spring bom.

@borinquenkid

Copy link
Copy Markdown
Member

Cool.

@jdaugherty

Copy link
Copy Markdown
Contributor Author

I split the micronaut bom into 2 - 1 for hibernate 5 & 1 for hibernate 7. Also, as part of the merge I lowered the memory back down and the tests are passing.

At this point, I need to review the licensing for the liquibase-hibernate import & then we can review this PR.

@jdaugherty

Copy link
Copy Markdown
Contributor Author

@borinquenkid I need your help - do you have a base branch of the liquibase library that you imported? I need to clearly know which files were brought into the project (we can't put our own headers on them).

I'm assuming it's the files under: grails-data-hibernate7/dbmigration/src/main/java ?

@jdaugherty

Copy link
Copy Markdown
Contributor Author

Per discussion with @borinquenkid 4.27 liquibase-hibernate is what was imported.

This means: https://github.com/liquibase/liquibase-hibernate/tree/v4.27.0-hibernate5 is the branch

jdaugherty added 2 commits May 4, 2026 12:49
- Rename snapshot/diff generators with 'Hibernate' prefix for clarity
- Extract NoOpConnectionProvider and NoOpMultiTenantConnectionProvider
  from inner classes to standalone classes
- Remove deprecated Hibernate 5 APIs: ClassLoaderDelegate,
  MetadataBuilderImpl, USE_NEW_ID_GENERATOR_MAPPINGS
- Replace Class.newInstance() with Constructor.newInstance() reflection
- Update Hibernate 7 API calls (MetadataBuilder, BootstrapServiceRegistry)
- Update META-INF service files to match renamed classes
- Update test fixtures for Hibernate 7 compatibility
@jdaugherty

Copy link
Copy Markdown
Contributor Author

I've reimported the code under dbmigration-core (dropping the liquibase name since it's trademarked). I've followed the guidelines here: https://www.apache.org/legal/src-headers.html#3party Which explicitly say do not add source headers. I've made 3 commits to illustrate the original forked code vs what Walter updated.

I believe the licensing side of this is "right" now, but @jamesfredley do you think we should have someone in the ASF review this part of the contribution?

borinquenkid and others added 2 commits June 22, 2026 13:10
Issue 1299 (grails-data-mapping) is about MongoDB configuration builder
recursion and has no connection to this spec. The annotation was copied
when the spec was ported between modules.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… 5 to 7

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@borinquenkid

borinquenkid commented Jun 23, 2026

Copy link
Copy Markdown
Member

We are working through your review comments against a deadline at the end of the month. Given the volume, using AI assistance is the only realistic way for me to address them at the speed and scale required.

borinquenkid and others added 10 commits June 23, 2026 15:23
The belongsTo = [WqBiAuthor] edit was unnecessary scope-bleed in an H5
test file. Reverting to the original bare-class form belongsTo = WqBiAuthor
restores the file to match 8.0.x and makes the H5 and H7 copies of the spec
byte-for-byte identical again. Verified: spec passes 9/9.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop the extra blank line between the package statement and imports - an
unintentional formatting artifact. Restores the single-blank-line convention.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The license header was unintentionally reformatted (two-space to one-space
indentation). Restore the canonical Apache header to match 8.0.x; the test
changes in this file are unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The PR had inverted this spec's relationship from many-to-one to one-to-many
and renamed the test, while the class kept its ...ManyToOne... name and the H7
twin kept the original many-to-one form. That changed what the test covers and
broke H5/H7 symmetry. Reverting restores the original many-to-one semantics and
re-aligns H5 with its H7 twin (modulo the H5/H7 sequence-param difference).
Verified: spec passes 1/1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reviewers (mattias_reichel, paulk_asert, scott) flagged that checker-qual was
added as an api dependency though only @NonNull/@nullable are used and no
Checker analyzer runs, so it leaked a runtime dependency to all GORM consumers
for zero benefit.

JSpecify is already on the compile classpath via the Spring Boot 4 BOM (the
Spring 7 ecosystem standard) and one binder already used it, so the module was
mixing two nullness libraries. Standardize on JSpecify:

- swap the four checker-qual imports to org.jspecify.annotations
- drop 'api org.checkerframework:checker-qual'; add 'compileOnly org.jspecify:jspecify'
- remove the now-unused checker-qual BOM entries (both PR-added, absent on 8.0.x)

Compiles, checkstyle passes, binder specs green (83/83).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The HibernateGrailsPlugin grailsVersion still declared '7.0.0-SNAPSHOT > *'
on the 8.0.x branch (projectVersion is 8.0.0-SNAPSHOT). Update both the H5 and
H7 plugins to '8.0.0-SNAPSHOT > *' to match the branch and keep the two plugins
consistent.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This class is new in this PR (not on 8.0.x) and was authored by Walter Duque
de Estrada, not Graeme Rocher. Fix the @author tag and correct @SInCE 7.0 to
@SInCE 8.0 to match the branch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Per review feedback, the binder-wiring method is mostly an orchestrator: a long
run of 'TypeName x = new TypeName(...)' declarations where the type is repeated
verbatim on the right. Converting the 36 locals to var removes that redundant
left-hand repetition and makes the wiring far easier to read. No behavior change
(var is compile-time inference); compiles and checkstyle passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
getCollector() compiles fine under the class-level @CompileStatic, so the
method-level SKIP was unnecessary. Removed it (the method now inherits the
class default). The SKIP on setupSpec() is left in place — that one genuinely
needs it for the Spring bean-definition DSL. Verified: compiles and the plugin
module tests pass (18/18).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The JSpecify migration removed the checker-qual dependency entirely, which broke
compilation under JDK 25 (CI was green on JDK 21, red on JDK 25). JDK 25's javac
requires checker-framework annotations such as @UnknownKeyFor — carried in the
bytecode of dependencies like Hibernate's BytecodeProvider — to be resolvable on
the compile classpath; JDK 21's javac tolerates them missing.

Restore checker-qual as compileOnly (not api): it satisfies the compile-time
annotation resolution JDK 25 needs without leaking a runtime dependency to GORM
consumers, which was the original review concern. The JSpecify annotations on our
own classes are kept.

Verified under JDK 25 (Corretto 25.0.1): grails-data-hibernate7-core and all
dependent H7 modules (grails-plugin, dbmigration, spring-orm, spring-boot) compile.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@testlens-app

testlens-app Bot commented Jun 24, 2026

Copy link
Copy Markdown

🚨 TestLens detected 1 failed test 🚨

Here is what you can do:

  1. Inspect the test failures carefully.
  2. If you are convinced that some of the tests are flaky, you can mute them below.
  3. Finally, trigger a rerun by checking the rerun checkbox.

Test Summary

CI - Groovy Joint Validation Build / build_grails > :grails-test-examples-scaffolding:integrationTest

Test Runs
UserControllerSpec > User list

🏷️ Commit: 7c2c442
▶️ Tests: 48947 executed
⚪️ Checks: 46/46 completed

Test Failures

UserControllerSpec > User list (:grails-test-examples-scaffolding:integrationTest in CI - Groovy Joint Validation Build / build_grails)
geb.waiting.WaitTimeoutException: condition did not pass in 10 seconds (failed with exception)
	at geb.waiting.Wait.waitFor(Wait.groovy:128)
	at geb.waiting.PotentiallyWaitingExecutor.execute(PotentiallyWaitingExecutor.groovy:31)
	at geb.Page.verifyThisPageAtOnly(Page.groovy:424)
	at geb.Page.getAtVerificationResult(Page.groovy:217)
	at geb.Page.verifyAt(Page.groovy:188)
	at geb.Browser.doAt(Browser.groovy:1208)
	at geb.Browser.at(Browser.groovy:410)
	at geb.Browser.to(Browser.groovy:566)
	at geb.Browser.to(Browser.groovy:543)
	at geb.Browser.to(Browser.groovy:532)
	at grails.plugin.geb.support.delegate.BrowserDelegate$Trait$Helper.to(BrowserDelegate.groovy:160)
	at com.example.UserControllerSpec.User list(UserControllerSpec.groovy:46)
Caused by: Assertion failed: 

title == pageTitle
|     |  |
|     |  'User List'
|     false
'Please sign in'

	at com.example.pages.UserListPage._clinit__closure1(UserListPage.groovy:28)
	at com.example.pages.UserListPage._clinit__closure1(UserListPage.groovy)
	at geb.waiting.Wait.waitFor(Wait.groovy:117)
	... 11 more

Muted Tests

Select tests to mute in this pull request:

  • UserControllerSpec > User list

Reuse successful test results:

  • ♻️ Only rerun the tests that failed or were muted before

Click the checkbox to trigger a rerun:

  • Rerun jobs

Learn more about TestLens at testlens.app.

@matrei matrei left a comment

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.

Some more feedback, will continue.

* Created by graemerocher on 01/03/2017.
*/
@Ignore
@Ignore // https://github.com/apache/grails-core/issues/14624 — MappingException: Repeated column (iteration_id) for Product; not fixed in this PR

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.

  • Use the @Issue annotation instead of a comment.
  • "not fixed in this PR" can be removed.

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.

Done in 6505db22bb — class-level @Issue('https://github.com/apache/grails-core/issues/14624') added alongside @Ignore; the redundant method-level @Ignore // not yet implemented and the stale grails-data-mapping/issues/882 ref removed.

Comment on lines -24 to -26
import spock.lang.Issue

@Issue('https://github.com/apache/grails-data-mapping/issues/1299')

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.

Leave a blank line between imports and class declaration?

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.

Done in 6505db22bb — blank line added in both H5 and H7.

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.

Have you pushed 6505db22bb?

Comment on lines +68 to +69
* TODO: rename to AHibernateSpec to follow the abstract class naming convention
*

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 don't think it is a good idea to rename it to AHibernateSpec.

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.

Agreed — TODO removed in 6505db22bb.

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 cannot see that the TODO was removed.

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 do disagree. By deprecating the current methods (findWithSql, findAllWithSql), and delegating to new methods (findWithNativeSql, findAllWithNativeSql), you are effectively changing the public API of GORM without discussion and consensus.

Also, please don't mark my review comments as resolved as it makes it very hard to find them.

@matrei matrei left a comment

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.

Some more feedback

borinquenkid and others added 3 commits June 24, 2026 12:31
- JSpecify: replace jakarta.annotation.Nonnull with org.jspecify.annotations.NonNull
  in ClassBinder, ClassPropertiesBinder, CollectionForPropertyConfigBinder,
  ColumnConfigToColumnBinder, ComponentBinder, RootBinder, SimpleValueBinder
- @SInCE 8.0: add to ClassBinder, CollectionBinder, CollectionForPropertyConfigBinder,
  ColumnBinder, ColumnConfigToColumnBinder, ComponentBinder
- @author: remove from GrailsBytecodeProvider, ClassPropertiesBinder, HibernateCriteriaBuilder
- ClassPropertiesBinder: fix @SInCE 7.0 → 8.0; remove constructor Javadoc descriptions
- ClassBinder: improve class Javadoc; fix persistant → persistent typo
- CollectionBinder: add @SInCE 8.0; remove constructor Javadoc description; use var
- ColumnBinder: fix stale [GrailsDomainBinder] prefix in log messages
- ColumnConfigToColumnBinder: remove dialect-aware default precision logic — only
  apply explicitly configured values; dialect defaults belong in NumericColumnConstraintsBinder
- SimpleValueBinder/ColumnBinder: wire actual Dialect from JdbcEnvironment through to
  NumericColumnConstraintsBinder so Oracle precision (126) is applied correctly at runtime
- HibernateCriteriaBuilder: fix run-on Architecture Javadoc sentence; document both
  setCriteriaMethodInvoker() and subclassing as extension points
- ColumnConfigToColumnBinderSpec: update tests to reflect that precision/scale are not
  set when unspecified (no longer defaulted to 15)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- SubclassMultipleListCollectionSpec (H5+H7): replace inline @ignore comment with
  @issue('#14624') annotation at class
  level; move @issue to test method; remove stale grails-data-mapping/issues/882 ref
- PersistentPropertySpec (H5+H7): add blank line between imports and class declaration
- HibernateSpec (H7): remove TODO suggesting rename to AHibernateSpec

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
borinquenkid and others added 6 commits June 24, 2026 16:27
…bernateEntity

Clean-break rename agreed in weekly meeting: HibernateEntity (H7) now exposes only
withSql(CharSequence) / withSql(CharSequence, Map) and withAllSql(CharSequence) /
withAllSql(CharSequence, Map).  The old findWithNativeSql / findAllWithNativeSql
primary methods and the deprecated findWithSql / findAllWithSql aliases are all
removed from the trait and from HibernateGormStaticApi (H7).

In H5 the new withSql/withAllSql methods are added and the existing findWithSql /
findAllWithSql methods are deprecated pointing to the new names; this keeps H5
backward-compatible while aligning the public API.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
H7 HibernateEntity now adds withSql/withAllSql alongside the existing
findWithNativeSql/findAllWithNativeSql and deprecated findWithSql/findAllWithSql
methods — no removal of existing methods. The new methods use the same private
helper pattern as H5 (currentHibernateStaticApi()) instead of inline casting.

H5 HibernateEntity is reverted to its original state — no new methods, no
deprecation annotations added.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The withSql/withAllSql additions are reverted. H7 HibernateEntity now exposes
exactly what it had before: findWithNativeSql/findAllWithNativeSql as the primary
methods and deprecated findWithSql/findAllWithSql as backward-compat aliases,
all delegating through the private currentHibernateStaticApi() helper.

Tests updated to use findWithNativeSql/findAllWithNativeSql and
findWithSql/findAllWithSql accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
H7's HibernateEntity now exposes the same public method names as H5
(findWithSql / findAllWithSql) while delegating internally to
HibernateGormStaticApi.findWithNativeSql / findAllWithNativeSql.
No deprecated aliases, no findWithNativeSql on the trait surface.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
These aliases are no longer needed: the HibernateEntity trait now exposes
findWithSql/findAllWithSql directly, delegating to findWithNativeSql/
findAllWithNativeSql which remain the implementation in HibernateGormStaticApi.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reorder JSpecify imports in the Hibernate 7 binder classes and restore the ColumnConfigToColumnBinder license header indentation so grails-data-hibernate7-core Checkstyle passes.

Assisted-by: Hephaestus:openai/gpt-5.5
@jamesfredley
jamesfredley merged commit 0a334c8 into 8.0.x Jun 25, 2026
48 of 49 checks passed
@jamesfredley
jamesfredley deleted the 8.0.x-hibernate7 branch June 25, 2026 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants