[Use Case]: Statically specify First/Limit at dev time so that singular return type can be valid on methods #532
Labels
enhancement
New feature or request
Milestone
As a ...
I need to be able to ...
statically specify a limit at development time
Which enables me to ...
write a repository method with a singular return type (
Optional<MyEntity>
orMyEntity
).Additional information
This is currently only possible (and awkwardly so) with Query by Method Name.
To allow it with
@Query
and parameter based queries (@Find
), we can addFirst
(proposed by Gavin in #530 (comment))The value would default to
1
.Reminder to update recommendations in
NonUniqueResultException
once we have this.This is being proposed for after Jakarta Data version 1.0.
The text was updated successfully, but these errors were encountered: