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

   **Step 1 (PR-E) prerequisite for Hibernate 7 work** - extracted from the 
staging branch so it can be reviewed on its own merits.
   
   ## Context
   
   This was originally split across two commits on the hibernate7 staging 
branch (`01c27f9a77` mongo portion + `c8cb43f2ec`) on PR #15654. @sbglasius 
questioned whether the MongoDatastoreSpec refactor was needed at all ("if 
needed, ok"), so it had to live somewhere with a clear scope. Extracting it 
here against `8.0.x` so the question can be settled on its own merits without 
holding up the Hibernate 7 clone.
   
   ## Scope
   
   Two coordinated changes committed together because the second depends on the 
first:
   
   ### 1. Rename mongo test tree `grails.gorm.tests` → `grails.gorm.specs`
   
   8 file renames + 18 import-update modifications:
   
   - Mongo-local domain classes: `Plant.groovy`, `Pet.groovy`, `Face.groovy`, 
`Nose.groovy`, `Person.groovy`
   - Mongo-local specs: `DirtyCheckEmbeddedCollectionSpec.groovy`, 
`FindNativeSpec.groovy`, `listener/PersistenceEventListenerSpec.groovy`
   - 18 sibling mongo specs updated to import the new paths
   
   Mongo is self-contained here - the renames cover both its specs AND its own 
copies of the domain classes those specs reference. No coupling to 
`grails-datamapping-core-test` or other modules.
   
   ### 2. Add `MongoDatastoreSpec` base class
   
   ```groovy
   abstract class MongoDatastoreSpec extends 
GrailsDataTckSpec<GrailsDataMongoTckManager> {
   }
   ```
   
   Plus refactoring ~107 mongo specs to extend `MongoDatastoreSpec` instead of 
repeating `GrailsDataTckSpec<GrailsDataMongoTckManager>` at every declaration 
site.
   
   ## Files changed
   
   114 files: 8 renames + 1 new file (MongoDatastoreSpec) + 105 modified mongo 
specs.
   
   ```
   404 insertions(+), 288 deletions(-)
   ```
   
   ## Verified
   
   `./gradlew :grails-data-mongodb-core:compileTestGroovy` passes cleanly. The 
rename + base class refactor compiles consistently on `8.0.x`.
   
   ## Why a separate PR
   
   @sbglasius's review of the staging PR specifically called this out:
   
   > "Was a refactor of `GrailsDataTckSpec<GrailsDataMongoTckManager>` to 
`MongoDatastoreSpec` needed? If yes, ok, if no, then it's just another source 
of noise."
   
   Extracting it here gives the question a clear, focused venue. If the 
refactor is wanted, it can land here and flow into `stage-hibernate7` via the 
next merge of `8.0.x`. If it's rejected, this PR can be closed and the 
corresponding commits removed from the staging branch via rebase.
   
   Authorship preserved from the original commits by @jdaugherty.
   
   ## Related
   
   - Step 1 PR-A: #15654 (the hibernate7 clone, will be rebased to drop these 
commits once PR-E + B + C + D are merged)
   - Step 1 PR-B: #15682 (async defensive coding cleanup)
   - Step 1 PR-C: #15683 (addAllDomainClasses helper)
   - Step 1 PR-D: #15684 (DetachedCriteriaSpec command-chain syntax)
   - Step 2: #15568 (the actual Hibernate 7 logic - blocked on Step 1 
prerequisites)
   


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