jakartaee / jakartaee/persistence

[3.2 TCK Challenge] Passing expressions of different types to `CriteriaBuilder#lt`

Open Beginner friendly
#1,001 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.2.0
Dominant language
Java
Stars
268
Forks
78
Avg merge
1d 6h
Merged PRs (30d)
13

Description

The following tests are passing expressions of different types as arguments to `CriteriaBuilder#lt`:

```
ee.jakarta.tck.persistence.core.criteriaapi.metamodelquery.Client2.queryTest10
ee.jakarta.tck.persistence.core.criteriaapi.strquery.Client2.queryTest10
```

I can't find anything in the specification or javadoc stating that this is allowed. In fact, Jakarta Persistence 4.0 is being amended in order specify this: https://github.com/jakartaee/persistence/pull/996

This indicates the TCK is testing something that was not specified. I would like to change that test to use expressions of the same type (`Double` or `Integer`).

See also https://hibernate.zulipchat.com/#narrow/channel/132094-hibernate-orm-dev/topic/7.2E3.20core.2Ecriteriaapi.2Emetamodelquery.2EClient2.20TCK.20failure/with/585222804

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ee.jakarta.tck.persistence.core.criteriaapi.metamodelquery.Client2.queryTest10 and ee.jakarta.tck.persistence.core.criteriaapi.strquery.Client2.queryTest10, then review the CriteriaBuilder#lt contract and the referenced specification amendment. Update both tests so the compared expressions use the same type, such as Double or Integer, and confirm the TCK tests still pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.