Repository navigation
Test a sort through the root alias by a bag whose fetch is deferred - #17307
Merged
Merged
Conversation
7fa74e0 passes the join types of the deferred fetches on in the call that strips this, the alias of the queried class, from the sort of a static list. A new AssociationSortSpec feature runs the test of those join types with this.trophies.title and this.regulars.name: the squad without regulars is kept, as it is without the alias. With an empty map in place of the join types, the feature fails without the leftJoinAssociationSort setting.
matrei
marked this pull request as ready for review
December 3, 2026 13:02
🚨 All tests passed but jobs failed 🚨Failed Jobs without Test Failures❌ CI / Build Grails-Core (windows-latest, 25, true) 🏷️ Commit: cd5c2e6 Rerun ControlsClick the checkbox to trigger a rerun: 🔲 Rerun jobs Learn more about TestLens at testlens.app/docs. |
jdaugherty
approved these changes
Dec 3, 2026
Contributor
|
Because this is just a test, i'm going to go ahead and merge this. |
jdaugherty
added a commit
that referenced
this pull request
Dec 5, 2026
Brings #17058, #17193, #17046, #17078, #16986, #17292 and #17307 from 7.0.x, the layout, view and template name checks of 7.0.x, and the SiteMesh 3 layout name check of 7.2.x. Asked of this merge by those pull requests: - #17292: grails-testing-support-mongodb/build.gradle keeps the 8.0.x dependencies and adds the three test dependencies after them. - #16986: QueryLockSpec for Hibernate 7 has the finder cases of the Hibernate 5 spec, without the lock argument of a criteria list, which Hibernate 7 does not apply (#17077). Query.lock(false) sets LockModeType.NONE, as on 7.0.x; it set null here. - The layout, view and template name notes, and the SiteMesh 3 one, are also in the Grails 8.0.1 section of upgrading80x.adoc, with the other notes of this merge. The note on enums under grails-app/domain is in the 8.0.1 part of the upgrade skill. Adapted to 8.0.x: the Hibernate 5 specs import the entities of grails.gorm.tests.entities and register their domain classes with registerDomainClasses; DynamicFinder.buildMatchSpec keeps the 8.0.x structure and gains the check for a trailing operator; the test dependencies of grails-gsp-core and grails-views-core gain byte-buddy and objenesis.
jdaugherty
added a commit
that referenced
this pull request
Dec 5, 2026
Brings the merge of 7.2.x into 8.0.x (847e06d): #17058, #17193, #17046, #17078, #16986, #17292 and #17307, the layout, view and template name checks, and the SiteMesh 3 layout name check. One conflict, in the grails-upgrade skill: the section on enums under grails-app/domain ends the Grails 8.0 part, where 8.1.x begins its Grails 8.1.0 part. Both are kept, the 8.0 section first, as in #17326.
jdaugherty
added a commit
that referenced
this pull request
Dec 5, 2026
Brings the merge of 8.0.x into 8.1.x (b41309f): #17058, #17193, #17046, #17078, #16986, #17292 and #17307, the layout, view and template name checks, and the SiteMesh 3 layout name check. Two conflicts. The grails-upgrade skill is kept as 9.0.x has it, as in #17327: it covers the upgrade from Grails 8 to 9 only, and the section this merge brings belongs to the Grails 8 skill. AstUtilsSpec keeps the features of both sides.
jdaugherty
added a commit
that referenced
this pull request
Dec 5, 2026
Brings 9.0.x's #16908, #17317 and #17319, 8.0.x's #16720, #16559, #16940, #16976, #17312, #17315 and #17318, and the merge of 7.2.x that came up through 8.0.x and 8.1.x (7b371cb): #17058, #17193, #17046, #17078, #16986, #17292 and #17307, the layout, view and template name checks, and the SiteMesh 3 layout name check. No conflicts. As #17316 and #17317 did on their branches, the GSP Spring Boot script example grabs the version this branch publishes, 9.1.0-SNAPSHOT.
jdaugherty
added a commit
that referenced
this pull request
Dec 5, 2026
Brings the merge of 9.0.x into 9.1.x (950aa9a): 9.0.x's #16908, #17317 and #17319, 8.0.x's #16720, #16559, #16940, #16976, #17312, #17315 and #17318, and 7.0.x's #17058, #17193, #17046, #17078, #16986, #17292 and #17307, the layout, view and template name checks, and the SiteMesh 3 layout name check. No conflicts. As #17316 and #17317 did on their branches, the GSP Spring Boot script example grabs the version this branch publishes, 10.0.0-SNAPSHOT.
jdaugherty
pushed a commit
to jdaugherty/grails-core
that referenced
this pull request
Dec 5, 2026
Carries apache#17046 (multi-tenant load and proxy query only in discriminator mode), apache#17193 (enums, interfaces, traits and nested classes under grails-app/domain are not domain classes), apache#16986 (Query.lock(false) no longer locks), apache#17078 (query arguments reach where queries and dynamic finders with Hibernate 5), apache#17058 (a dynamic finder refuses text after its operator), apache#17292 and apache#17307 (tests), and the commits that keep layout, view and template names within the directory they are looked up in, up to 20f2ee77a7. - upgrading60x.adoc keeps the 7.1.x side; the changes to the 7.0.18 notes are applied to upgrading70x.adoc, where 7.1.x keeps them. - The grails-upgrade skill gets the 7.0.x section on enums and other types under grails-app/domain at the end of its 7.0 part, before the 7.1.0 part.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Test-only follow-up to 7fa74e0, which fixed the compile error that #17072 and #17073 made together on 7.0.x.
#17073 strips
this, the alias of the queried class, from the sort of a static list with a recursive call ofaddOrderPossiblyNested. #17072 gave that method the join types of the fetches that a sort defers. 7fa74e0 passes them on in that call, sosort: 'this.regulars.name'joins a bag whose fetch was deferred with the left join of that fetch, assort: 'regulars.name'does. No test covered that. The call also compiles with an empty map in their place, andAssociationSortSpecandAssociationSortLeftJoinSpecstill pass.A new
AssociationSortSpecfeature runs #17072's test of those join types, 'a sort by a bag whose fetch is deferred keeps the left join of the fetch', withthis.trophies.titleandthis.regulars.name.Verification
On this branch:
:grails-data-hibernate5-core:testpasses: 3,267 tests, no failures, 168 skipped.:grails-data-hibernate5-core:codeStylefinds no Checkstyle or CodeNarc violations.deferredFetchJoinTypesin that call, the three rows of the new feature fail inAssociationSortSpec, which runs withoutleftJoinAssociationSort: the squad without regulars is lost.AssociationSortLeftJoinSpecjoins left either way. Every other feature of the two specs passes with the empty map.