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
Robert Verdes opened DATAREST-511 and commented
A Repository method like:
User findFirstByName(@Param("name") String name);
works well with issuing a /search/findFirstByName?name=foo, but when using an Optional as a return type:
Optional<User> findFirstByName(@Param("name") String name);
as per documentation:
for the queries limiting the result set to one instance, wrapping the result into an Optional is supported.
we get the "PersistentEntity must not be null!" exception
Affects: 2.3 GA (Fowler)
Backported to: 2.3.1 (Fowler SR1)
The text was updated successfully, but these errors were encountered:
Oliver Drotbohm commented
Qualified as improvement as Spring Data REST hasn't supported Optional yet. I can't find the quote you mention in the Spring Data REST reference documentation.
Optional
However, his has been fixed and back-ported to the Evans maintenance branch. Feel free to give the snapshots a try
Sorry, something went wrong.
odrotbohm
No branches or pull requests
Robert Verdes opened DATAREST-511 and commented
A Repository method like:
works well with issuing a /search/findFirstByName?name=foo,
but when using an Optional as a return type:
as per documentation:
we get the "PersistentEntity must not be null!" exception
Affects: 2.3 GA (Fowler)
Backported to: 2.3.1 (Fowler SR1)
The text was updated successfully, but these errors were encountered: