Skip to content

test(examples): entry-point scenarios for criteria queries with an association path (#16902) - #16907

Merged
borinquenkid merged 4 commits into
8.0.xfrom
test/app-level-query-scenarios-8.0.x
Nov 10, 2026
Merged

borinquenkid merged 4 commits into
8.0.xfrom
test/app-level-query-scenarios-8.0.x

Conversation

@borinquenkid

@borinquenkid borinquenkid commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Adds the ten entry-point scenarios of #16902 as features in the Hibernate 7 and Hibernate 5 examples. Each runs one query through an entry point the module join tests do not reach, with an association path next to an alias, a left join, a service, a connection or a tenant, and names the rows it expects. No production code changes.

#16773 is merged, so the diff is only the scenarios.

Scenario Where
where query through one path twice, and over two paths QueryEntryPointScenariosSpec (H7 gorm, H5 grails-hibernate)
dynamic finder next to a criteria alias; where subquery on an association same
ne and not over a left alias; isNull/isNotNull through a left alias same
fetch join with a null association same
data service @Where on an association path QueryEntryPointServiceSpec (both grails-data-service)
the same association query on the default and a named connection QueryEntryPointDataSourceSpec (both grails-multiple-datasources)
association query under two tenants QueryEntryPointTenantSpec (both grails-partitioned-multi-tenancy)

Four features are @PendingFeature, each with its reason; they fail once the difference is fixed, which is the prompt to remove the mark:

All nine example modules pass their full integration tests; codeStyle is clean. CI is off (no ci).

Refs #16902, #16896

https://claude.ai/code/session_01Dmki4RzWwreEC2GkkyFnvL

…ation path next to an alias, a left join, a service, a connection or a tenant

The ten scenarios of #16902 as features in the Hibernate 7 and Hibernate 5 examples: a where query through one
path twice and over two paths, a dynamic finder next to a criteria alias, a where subquery on an association, ne
and not over a left alias, isNull and isNotNull through a left alias, a fetch join with a null association, a data
service @where on an association path, the same association query on the default and a named connection, and an
association query under two tenants of a partitioned application. The Hibernate 5 example marks the three that
differ from Hibernate 7 as pending features (#16905, #16853), and the Hibernate 7 example the where query on a
named connection (#16906).

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

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.

@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 added scenarios check association queries through the entry points the module tests do not reach.

…iteria builder on Hibernate 5 and 7

One path spelled several ways is one join, a dotted createAlias joins the associations before its last one, and an order by an alias-qualified path sorts by that alias through both overloads. Hibernate 5 marks all three pending until the alias fixes of #16890 reach 8.0.x.

@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 added scenarios check association queries through the entry points the module tests do not reach.

@borinquenkid
borinquenkid merged commit 5fb0310 into 8.0.x Nov 10, 2026
49 checks passed
borinquenkid added a commit that referenced this pull request Nov 19, 2026
…as on Hibernate 5

ne no longer returns rows whose value is null on Hibernate 7 (matching Hibernate 5), so
a club without a team is left out of ne on a property of a left alias, as on Hibernate 5
(#16905). The scenario merged in #16907 expected the earlier behaviour.

Claude-Session: https://claude.ai/code/session_01Dmki4RzWwreEC2GkkyFnvL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants