Skip to content

HHH-20313 Fix JPA Criteria parameter type inference TCK failure#12123

Merged
beikov merged 1 commit intohibernate:7.3from
beikov:tck-3.2.1-7.3
Apr 20, 2026
Merged

HHH-20313 Fix JPA Criteria parameter type inference TCK failure#12123
beikov merged 1 commit intohibernate:7.3from
beikov:tck-3.2.1-7.3

Conversation

@beikov
Copy link
Copy Markdown
Member

@beikov beikov commented Apr 2, 2026

Backport of #12076


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.



Please make sure that the following tasks are completed:
Tasks specific to HHH-20313 (Bug):

  • Add test reproducing the bug
  • Add entries as relevant to migration-guide.adoc OR check there are no breaking changes

https://hibernate.atlassian.net/browse/HHH-20313

@hibernate-github-bot
Copy link
Copy Markdown

hibernate-github-bot Bot commented Apr 2, 2026

Thanks for your pull request!

This pull request appears to follow the contribution rules.

› This message was automatically generated.

@yrodiere
Copy link
Copy Markdown
Member

@scottmarlow
Copy link
Copy Markdown
Member

scottmarlow commented Apr 13, 2026

Rebasing as @scottmarlow is telling us the TCK passes now that we've fixed a few issues (https://hibernate.zulipchat.com/#narrow/channel/132094-hibernate-orm-dev/topic/7.2E3.20StoredProcedureQuery.20TCK.20failure/near/585203520)

More specifically, we now pass a test that we failed with ORM 7.3.0.Final. WildFly Preview now passed the StoredProcedureQuery tests (with ORM 7.3.1) but I'm looking into a different failure:

SVR-ERROR: org.hibernate.query.QueryArgumentException: Given type is incompatible with parameter type (java.lang.Integer is not assignable to java.lang.Double)
2026-04-13 09:57:50,966 INFO [stdout] (Thread-61) at org.hibernate@7.3.1.Final//org.hibernate.query.internal.QueryParameterBindingImpl.checkClarifiedType(QueryParameterBindingImpl.java:324)
2026-04-13 09:57:50,966 INFO [stdout] (Thread-61) at org.hibernate@7.3.1.Final//org.hibernate.query.internal.QueryParameterBindingImpl.clarifyType(QueryParameterBindingImpl.java:310)

I'm looking into why I missed this failure (https://github.com/jakartaee/platform-tck/blob/3e642738584b2e4b9a6a9d80bb12fed6b53afb7e/tcks/apis/persistence/persistence-inside-container/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/criteriaapi/metamodelquery/Client2.java#L326) when I tested with ORM 7.3.0.Final.

Update: ORM 7.3.0.Final has the same failure as well.

@yrodiere
Copy link
Copy Markdown
Member

yrodiere commented Apr 16, 2026

The commit " HHH-20313 Fix JPA Criteria parameter type inference TCK failure " is causing failures. I'm moving the upgrade part to #12192 so we can merge that immediately. I'd suggest repurposing this PR to simply addressing HHH-20313.

@scottmarlow
Copy link
Copy Markdown
Member

The commit " HHH-20313 Fix JPA Criteria parameter type inference TCK failure " is causing failures. I'm moving the upgrade part to #12192 so we can merge that immediately. I'd suggest repurposing this PR to simply addressing HHH-20313.

Thanks @yrodiere + @beikov , I'll create the separate pr based on this one to simply address HHH-20313 as that change worked for my local (Jakarta EE 11) TCK testing:

The core.criteriaapi.metamodelquery.Client2 tests all passed locally with the 1a0e7d4 change:

[INFO] Running ee.jakarta.tck.persistence.core.criteriaapi.metamodelquery.Client2AppmanagedTest
(file:/home/smarlow/.m2/repository/org/jboss/threads/jboss-threads/2.3.6.Final/jboss-threads-2.3.6.Final.jar)
[INFO] Tests run: 77, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 326.5 s -- in ee.jakarta.tck.persistence.core.criteriaapi.metamodelquery.Client2AppmanagedTest
[INFO] Running ee.jakarta.tck.persistence.core.criteriaapi.metamodelquery.Client2AppmanagednotxTest
[INFO] Tests run: 77, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 322.2 s -- in ee.jakarta.tck.persistence.core.criteriaapi.metamodelquery.Client2AppmanagednotxTest
[INFO] Running ee.jakarta.tck.persistence.core.criteriaapi.metamodelquery.Client2PmservletTest
[INFO] Tests run: 77, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.534 s -- in ee.jakarta.tck.persistence.core.criteriaapi.metamodelquery.Client2PmservletTest
[INFO] Running ee.jakarta.tck.persistence.core.criteriaapi.metamodelquery.Client2PuservletTest
[INFO] Tests run: 77, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.530 s -- in ee.jakarta.tck.persistence.core.criteriaapi.metamodelquery.Client2PuservletTest
[INFO] Running ee.jakarta.tck.persistence.core.criteriaapi.metamodelquery.Client2Stateful3Test
[INFO] Tests run: 77, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1064 s -- in ee.jakarta.tck.persistence.core.criteriaapi.metamodelquery.Client2Stateful3Test
[INFO] Running ee.jakarta.tck.persistence.core.criteriaapi.metamodelquery.Client2Stateless3Test
[INFO] Tests run: 77, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1074 s -- in ee.jakarta.tck.persistence.core.criteriaapi.metamodelquery.Client2Stateless3Test
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 462, Failures: 0, Errors: 0, Skipped: 0

@yrodiere yrodiere changed the title Update to Jakarta Persistence TCK version 3.2.1 HHH-20313 Fix JPA Criteria parameter type inference TCK failure Apr 17, 2026
Copy link
Copy Markdown
Member

@sebersole sebersole left a comment

Choose a reason for hiding this comment

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

Made a minor suggestion to help cleanup a complex if-statement, but that's just eye candy. The actual changes look good.

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
55.6% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@beikov beikov merged commit 25d93fc into hibernate:7.3 Apr 20, 2026
26 of 29 checks passed
@beikov beikov deleted the tck-3.2.1-7.3 branch April 20, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants