jamesfredley opened a new pull request, #15683:
URL: https://github.com/apache/grails-core/pull/15683

   **Step 1 (PR-C) prerequisite for Hibernate 7 work** - extracted from the 
staging branch so it can be reviewed on its own merits.
   
   ## Context
   
   This change was originally pulled forward into the hibernate7 staging branch 
as commit `ed0916dd93` on PR #15654. Reviewers (@matrei, @sbglasius) correctly 
pointed out it is unrelated to the Hibernate 7 clone and should be a standalone 
PR. Extracting it here against `8.0.x` so it can land on its own and then flow 
naturally into both the staging branch (PR #15654) and Step 2 (PR #15568).
   
   ## Scope
   
   Adds a small helper method to 
[`GrailsDataTckManager`](grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/base/GrailsDataTckManager.groovy)
 and mechanically replaces all callers:
   
   ```groovy
   // before
   manager.domainClasses.addAll([Foo, Bar])
   
   // after
   manager.addAllDomainClasses([Foo, Bar])
   ```
   
   The helper hides the implementation detail that `domainClasses` is a mutable 
list field, and reads more naturally at the call site.
   
   ### Files changed
   
   182 files total - the method definition + 181 call sites:
   
   | Location | Count |
   |----------|-------|
   | `grails-datamapping-tck/src/main/...` | 13 specs + 1 manager (with new 
method) |
   | `grails-datamapping-core-test/src/test/...` | 49 core test specs |
   | `grails-data-hibernate5/core/src/test/...` | 27 hibernate5 specs |
   | `grails-data-mongodb/core/src/test/...` | 92 mongo specs |
   
   The change is purely mechanical - I verified a sample of files diff 
identically to commit `ed0916dd93` on the staging branch.
   
   ## Why a separate PR
   
   PR #15654 (Step 1) is meant to be a near-pure clone of `hibernate5` → 
`hibernate7`. PR #15568 (Step 2) is the actual Hibernate 7 logic. Both 
reviewers asked for cleanup of this nature to be split out so the review effort 
on Step 1 and Step 2 can stay focused on hibernate-related diffs.
   
   Once this PR is merged, the corresponding "Pull forward 
manager.addAllDomainClasses change" commit on the hibernate7 staging branch 
should be removed since the change will arrive through the next merge of 
`8.0.x`.
   
   ## Related
   
   - Step 1 PR-A: #15654 (the hibernate7 clone, already updated to remove 
`logback.groovy` and the unrelated `stepByStep.adoc` change)
   - Step 1 PR-B: #15682 (async defensive coding cleanup - in review)
   - Step 1 PR-D: DetachedCriteriaSpec TCK style cleanup (forthcoming)
   - Step 2: #15568 (the actual Hibernate 7 logic - blocked on Step 1 
prerequisites)
   
   ## Note on MongoDatastoreSpec base class
   
   The companion change on the staging branch (commit `c8cb43f2ec` - 
introducing `MongoDatastoreSpec` as a thin base class to reduce generic noise 
across 108 mongo specs) was **not** included in this PR because it depends on a 
separate `tests/` → `specs/` package rename that hasn't been applied to 
`8.0.x`. That refactor can be a follow-up PR or stay in the staging branch 
since @sbglasius's review comment on it was conditional ("if needed, ok").
   


-- 
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]

Reply via email to