Skip to content

docs(upgrade-skill): add the open 7.0.x changes to the Grails 7.0.18 part - #17082

Open
borinquenkid wants to merge 6 commits into
7.0.xfrom
docs/upgrade-skill-7-0-19-7.0.x
Open

borinquenkid wants to merge 6 commits into
7.0.xfrom
docs/upgrade-skill-7-0-19-7.0.x

Conversation

@borinquenkid

@borinquenkid borinquenkid commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Adds the changes of the open 7.0.x PRs that change a result to the # Grails 7.0.18 part of the grails-upgrade skill: #17078 (query arguments), #17051 (bulk write guard), #17052 (map sorts, empty in lists), #17054 (grouped paged total), #17058 (finder trailing text), #17059 (enum maxSize), #17014 (query cache), #16986 (lock: false) and #16971 (remember-me redirect). Each entry says what to search for and how to keep the earlier result.

7.0.18 has not been staged again, so a change merged now ships in it (matrei, 11-20); if it is staged before these merge, the entries move to a 7.0.19 part. The branch name still says 7.0.19.

Docs only, no code. The entries describe behavior that ships with those PRs, so this one should merge after them, or alongside the last of them. Notes of later 7.0.x PRs are added to this part by their own PR.

https://claude.ai/code/session_01Dmki4RzWwreEC2GkkyFnvL

Collects the upgrade notes of the open 7.0.x Hibernate 5, GORM and Spring Security fixes
(query arguments, bulk write guard, sorts and empty in lists, dynamic finder trailing text,
enum maxSize, query cache and lock, remember-me redirect) into the grails-upgrade skill.

Claude-Session: https://claude.ai/code/session_01Dmki4RzWwreEC2GkkyFnvL
Copilot AI balanced review requested due to automatic review settings November 19, 2026 22:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@jdaugherty

Copy link
Copy Markdown
Contributor

FYI: I was waiting to do this until 18 actually goes out - we had to cancel the release so 18 is the correct one for now. Let's look at this PR again once the vote passes?

@jamesfredley jamesfredley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requested changes. The note tells a caller to drop an empty not-in list, which returns every row instead of none.

…ty list

Dropping the criterion returns every row, so the advice for keeping the earlier result of a negated empty in list
is to return an empty list before the query when the input list is empty.

Claude-Session: https://claude.ai/code/session_01Dmki4RzWwreEC2GkkyFnvL
@borinquenkid

Copy link
Copy Markdown
Member Author

@jamesfredley: the entry for an empty not in list now says to return an empty list before the query when the input list is empty, since dropping the criterion returns every row, not none. The same sentence was in the upgrade note of #17052, which is fixed there too.

https://claude.ai/code/session_01Dmki4RzWwreEC2GkkyFnvL

@jamesfredley jamesfredley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The items this review found have been addressed. An empty not-in list is kept by returning an empty list.

@borinquenkid

Copy link
Copy Markdown
Member Author

@matrei: the entries are in the # Grails 7.0.18 part of the skill now, as your correction asks. The # Grails 7.0.19 part is gone, and the description and the target-version line say 7.0.18 again. If 7.0.18 is staged again before this merges, I move them back to 7.0.19. Only the skill changed.

https://claude.ai/code/session_01Dmki4RzWwreEC2GkkyFnvL

@sanjana2505006 sanjana2505006 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is a useful consolidation. A few notes:

  1. The title and description still say 7.0.19; could they be updated to match the move into the 7.0.18 part?
  2. The branch conflicts with 7.0.x now that the "GSP tag attributes" section landed in the 7.0.18 part (1e69f3a); it needs a rebase, and the new sections' position relative to it should be checked.
  3. The new headings use Title Case, but the rest of the skill uses sentence case (e.g. "Interceptor URI matching"). Could they match?
  4. Empty in lists: "Removing the criterion would return every row, not none" reads as redundant, since every row is already the new result. Maybe: "To keep the earlier result (no rows), return an empty list before running the query when the input list is empty; dropping the criterion would return every row." Also, was the behavior on H2 and other databases already "every row"? If so, saying so would help readers on those databases.
  5. The enum maxSize and remember-me sections don't say what to search for, unlike the other entries. Suggested: enum properties with maxSize or inList constraints, and subclasses of GrailsRememberMeAuthenticationFilter or calls to setAuthenticationSuccessHandler.

Since every entry depends on an open PR (#17078, #17051, #17052, #17054, #17058, #17059, #17014, #16986, #16971), would it make sense to mark this as a draft until they merge, so an entry doesn't ship for a fix that misses 7.0.18?

@borinquenkid borinquenkid changed the title docs(upgrade-skill): add the Grails 7.0.19 part docs(upgrade-skill): add the open 7.0.x changes to the Grails 7.0.18 part Nov 20, 2026
@borinquenkid

Copy link
Copy Markdown
Member Author

@sanjana2505006: thank you, all five are in. (1) The title and description say 7.0.18; the branch name still says 7.0.19, and I left it so the pull request keeps its head. (2) 7.0.x is merged in; the GSP tag attributes section comes first and the new entries follow it. (3) The headings are in sentence case. (4) The empty in entry now says that Hibernate writes an empty list as in (null) on PostgreSQL, MySQL and MariaDB, that H2 accepts an empty list and already matched every row, and how to keep the earlier result. (5) The enum and remember-me entries say what to search for: enum properties with maxSize or inList, and subclasses of GrailsRememberMeAuthenticationFilter or calls to setAuthenticationSuccessHandler.

On marking it a draft: the description says it merges after the pull requests it describes, and I leave the draft flag to the maintainers. If you want it a draft, say so and I will.

https://claude.ai/code/session_01Dmki4RzWwreEC2GkkyFnvL

@borinquenkid

Copy link
Copy Markdown
Member Author

@sbglasius: this edits the grails-upgrade skill only, so one approval is enough. It lists what to search for when a 7.0.18 change alters a result. Does it read clearly to someone outside the data layer?

@jamesfredley jamesfredley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requested changes. The note tells a caller to return an empty list when an empty negated list is only one side of an or.

## GORM for Hibernate 5: sorts, empty in lists and paged totals

- A map as the `sort` argument, `list(sort: [a: 'asc', b: 'desc'])`, orders by every property in the order listed; the static `list(sort: map)` kept only the last one. Sorting by a property of a composite id works. A sort no longer joins an association that the query's own block already joined. Review code that relied on the old order.
- An empty list given to `inList`, or to `in`, is an explicit false, so its negation matches every row: `not { inList('year', []) }` and `findAllByYearNotInList([])` matched nothing on PostgreSQL, MySQL and MariaDB, where Hibernate writes an empty list as `in (null)`. On H2, which accepts an empty `IN` list, they already matched every row. To keep the earlier result on those three databases, return an empty list before running the query when the input list is empty; dropping the criterion would return every row.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An empty year list is inside a not, and that not is one side of an or with year equal to 2024. The old query still returned the rows from 2024. Following this note returns no rows. Return an empty list only when the negated list is required for every match.


1. Read the application's current Grails version from `grailsVersion` in `gradle.properties`.
2. Establish the target version. This skill covers targets up to Grails 7.0.19.
2. Establish the target version. This skill covers targets up to Grails 7.0.18.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably are going to want to support property substitution so we can automate this in the future. Do you have time to automate that?

@borinquenkid

Copy link
Copy Markdown
Member Author

@jamesfredley: fixed the note. An empty negated list is returned as an empty list only when the negated list is required for every match. When it is one side of an or, the note says to leave that side out: it matched nothing there, so the other sides alone gave the earlier result, and returning an empty list would drop their rows.

@jamesfredley jamesfredley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requested changes. The note tells a caller to drop an empty negated list from an or that is itself negated.

## GORM for Hibernate 5: sorts, empty in lists and paged totals

- A map as the `sort` argument, `list(sort: [a: 'asc', b: 'desc'])`, orders by every property in the order listed; the static `list(sort: map)` kept only the last one. Sorting by a property of a composite id works. A sort no longer joins an association that the query's own block already joined. Review code that relied on the old order.
- An empty list given to `inList`, or to `in`, is an explicit false, so its negation matches every row: `not { inList('year', []) }` and `findAllByYearNotInList([])` matched nothing on PostgreSQL, MySQL and MariaDB, where Hibernate writes an empty list as `in (null)`. On H2, which accepts an empty `IN` list, they already matched every row. To keep the earlier result on those three databases, when the negated list is required for every match, return an empty list before running the query when the input list is empty; dropping the criterion would return every row. When the negated list is one side of an `or`, leave that side out when the list is empty: it matched nothing there, so the other sides alone gave the earlier result, and returning an empty list would drop their rows.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The or is inside a not: not { or { not { inList('year', []) }; eq('year', 2024) } }. A row with year 2023 was excluded before. Following this note returns it. Limit the advice to an or that is not negated.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

5 participants