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
Projections not handled correctly when Optional is used as wrapping return type [DATAJPA-951] #1302
Comments
Yuki YOSHIDA commented I had same issue, and posted SO http://stackoverflow.com/questions/38828341/jparepository-method-having-constructor-expression-and-optional-return-type-caus FYI |
Oliver Drotbohm commented Any chance you add the complete stack trace so that we can see what the calling path is? |
Oliver Trosien commented I'm facing the same problem. Here's a stack trace.
|
Oliver Trosien commented Work-around: Create a default method that wraps the original "plain" finder into an Optional.ofNullable() |
Oliver Drotbohm commented Looks like Spring Frameworks own |
Oliver Drotbohm commented That's fixed in master and the bugfix branch for Hopper. Feel free to give the snapshots a try |
Yuki YOSHIDA commented
Above query works fine at 1.10.3.BUILD-SNAPSHOT, thanks ! |
Maximos Sapranidis opened DATAJPA-951 and commented
When using Optional return type and JPQL projection to create an object (not an Entity type)
The following exception is thrown:
An exaple repository is:
In previous versions this was working as expected
Affects: 1.10.2 (Hopper SR2), 1.11 M1 (Ingalls)
Referenced from: commits d75019b, 1f677bd
Backported to: 1.10.3 (Hopper SR3)
The text was updated successfully, but these errors were encountered: