Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app throws "Applying Null Precedence using Criteria Queries is not yet supported." exception in v3.4.0 but works with v3.3.6 #3704

Closed
kctang opened this issue Dec 5, 2024 · 2 comments
Labels
status: duplicate A duplicate of another issue

Comments

@kctang
Copy link

kctang commented Dec 5, 2024

I'm migrating a spring boot v2.7.x app to v3.4.0 At runtime, i'm getting "Applying Null Precedence using Criteria Queries is not yet supported." exception thrown.

throw new UnsupportedOperationException("Applying Null Precedence using Criteria Queries is not yet supported.");

The exception was thrown when trying to execute my repository interface's method that looks something like Page<Xxx> findByXxxAndYyy(String xxx, yyy, Pageable pageable);.

I tried to switch to spring boot v3.3.6 and the app works without issue, so only seems to affect v3.4.0.

I placed a comment in a related issue.

Looks like a bug to me.

Thanks for reading & hope this issue can be solved soon.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 5, 2024
@mp911de mp911de added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels Dec 6, 2024
@mp911de
Copy link
Member

mp911de commented Dec 10, 2024

Null precedence wasn't ever supported using Criteria Queries because JPA doesn't specify (until JPA 3.2) the necessary API. We just never raised awareness that this isn't working. We consider leniently accepting and silently dropping sort definitions a potential source of bugs that easily goes unnoticed. Therefore, we introduced an exception to alert you that the intended null sorting behavior isn't available. If you do not specify null precedence, then the exception goes away.

@mp911de
Copy link
Member

mp911de commented Dec 10, 2024

Closing as duplicate of #1280. Null precedence will come with Spring Data JPA 4.0.

@mp911de mp911de closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants