jdaugherty opened a new pull request, #16389:
URL: https://github.com/apache/grails-core/pull/16389
## Summary
Backports #16148 (`75cd61800d`, merged to `8.1.x` on 2026-08-16) to `8.0.x`:
- Compiler-crash fixes in the GORM AST transforms
(`DirtyCheckTransformation`, `DirtyCheckingTransformer`,
`GormEntityTransformation`, `JpaGormEntityTransformation`, `TenantTransform`,
`OrderedGormTransformation`)
- New `LocalTransformationSupport`
- 33 files of test coverage, including `DetachedCriteriaASTTransformation`
(previously 0% — the global transform normally makes the local,
annotation-driven one redundant in a real build) and the `where {}` / `find {}`
/ `findAll {}` query-DSL rewriting
- The `protectSqlInjectionAttacks` kill switch documented in
`securingAgainstAttacks.adoc`
`8.0.x` has been without these fixes for five weeks while `8.1.x` and
`9.0.x` have had them.
## Why this is not a cherry-pick
A plain `git cherry-pick 75cd61800d` conflicts in
`GormEntityTransformation.groovy`. `8.0.x` moved under that commit — it since
grew `resolveIdentityType(...)` — so hand-resolving the conflict would mean
redoing a reconciliation that already exists.
The only non-merge commit touching these production files on `8.1.x` but not
`8.0.x` is #16148 itself; everything else is `8.0.x`-into-`8.1.x`
merge-forwards, and no `8.0.x` commit for these paths is missing from `8.1.x`.
So `8.1.x`'s current file contents are exactly #16148 reconciled with `8.0.x`'s
later work. This PR takes those contents directly.
Result: 41 files, +3515/-82, against the original's +3516/-83. Both sides
verified present afterwards — `resolveIdentityType` (from `8.0.x`) and
`LocalTransformationSupport` plus the new specs (from #16148).
## One behavioural change
This drops the `getAssociationMethodNode` parameter from
`GormEntityTransformation.injectAssociationsForJpaEntity`, as #16148 did. The
parameter was declared but never referenced in the method body, and the method
is private, so no caller loses anything.
## Side effect worth noting
#16148 is the base commit of several open PRs. Each reports a phantom
conflict against `8.0.x` in `GormEntityTransformation.groovy` — a file none of
them touch — purely because that commit is missing here. Landing this removes
that friction.
## Test plan
- [x] `./gradlew :grails-datamapping-core:test` — 107 classes, 1176 tests, 0
failures (`DO_NOT_CACHE_TESTS=true`); 20 backported specs confirmed in the
executed set by name
- [x] `./gradlew :grails-datamapping-core:codeStyle` — clean
- [x] `./gradlew bootJar check -PgrailsIndy=false -PonlyHibernate7Tests
-PskipCodeStyle` — the downstream check that matters, since these transforms
are what every GORM entity compiles through
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]