-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Spring JPA - type LocalDateTime in Projection type must be an interface! #24528
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
Comments
Spring Data has required projection types to be an interface since projection support was introduced so it's not clear why it's started to fail upon upgrade to Spring Boot 2.4 and, therefore, Spring Data 2020.0. I suspect it'll be due to a change somewhere in Spring Data but I can't tell for certain from what you've shared thus far. If you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue. |
Hello @wilkinsona , i made sample project, if You run it like usual Spring app, that will throw this exception |
Thanks for the sample. I've reproduced the problem. With Spring Data Neumann (used by Spring Boot 2.3), the projection isn't used and the I'm not sure if what you're experiencing is intentional or an unintended side-effect. Please open a Spring Data Commons issue so that the Data team can take a look and also comment here with a link to the issue so that we can follow along. |
Ok, Created issue in Data Commons https://jira.spring.io/browse/DATACMNS-1847 |
Uh oh!
There was an error while loading. Please reload this page.
In Spring boot 2.4.1 & 2.4.0
When use projection with field LocalDateTime
after fetch it from DB, get exception when try access to LocalDateTime field
getCreateDate()
And in previews versions it works ok
The text was updated successfully, but these errors were encountered: