Skip to content

@Query returning Couldn't find PersistentEntity when querying one column with null value #1190

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

Closed
aquilesb opened this issue Mar 3, 2022 · 1 comment
Labels
status: duplicate A duplicate of another issue

Comments

@aquilesb
Copy link

aquilesb commented Mar 3, 2022

Hi,

I have upgraded spring-boot from 2.5.10 to 2.6.4 and I noticed one behavior has changed and stopped working.
When I try to load using the @Query annotation only one column from the query and return it inside an Optional, it throws the Couldn't find PersistentEntity Exception when the value of the column is null in the DB. If the column has a value, it works as before.

In version 2.5.10, it was returning an empty Optional. If I try to return the Entity inside the optional, it works as before.

I have created this repo to where I reproduce the behavior.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 3, 2022
@schauder
Copy link
Contributor

schauder commented Mar 3, 2022

Duplicate of #1167

Fixed by 63f2331

The fix will be included in the 2.4.0-M4 release.

@schauder schauder closed this as completed Mar 3, 2022
@schauder schauder added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 3, 2022
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