jamesfredley opened a new pull request, #15684:
URL: https://github.com/apache/grails-core/pull/15684
**Step 1 (PR-D) 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 part of PR #15654. @sbglasius flagged it on
[`DetachedCriteriaSpec.groovy`](grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/DetachedCriteriaSpec.groovy):
> "This is an unneeded change for this PR. Removing parentheses should have
been done in a clean-up 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
Single file. 18 line changes. Pure style cleanup:
```groovy
// before
criteria.with {
eq('lastName', 'Simpson')
}
// after
criteria.with {
eq 'lastName', 'Simpson'
}
```
| Call | Count |
|------|-------|
| `eq('lastName', 'Simpson')` → `eq 'lastName', 'Simpson'` | 15 |
| `like('firstName', 'B%')` → `like 'firstName', 'B%'` | 3 |
| **Total** | **18** |
This matches the idiomatic Groovy DSL convention used elsewhere in GORM
criteria builders and is the form adopted on the hibernate7 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. @sbglasius's
review of the staging PR 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 style change 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-C: #15683 (addAllDomainClasses helper - in review)
- 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]