java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
jakarta.data.exceptions.DataException
jakarta.data.exceptions.NonUniqueResultException
- All Implemented Interfaces:
- Serializable
This exception is raised when execution of a repository method with a singular
 return type finds multiple results. This error may be circumvented using the
 
findFirst... method name pattern or by supplying Limit.of(1)
 as a parameter to explicitly request only the first result.- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionNonUniqueResultException(String message) Constructs a new NonUniqueResultException exception with the specified detail message.NonUniqueResultException(String message, Throwable cause) Constructs a new NonUniqueResultException exception with the specified detail message.Constructs a new NonUniqueResultException exception with the specified cause.
- 
Method SummaryMethods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- 
Constructor Details- 
NonUniqueResultExceptionConstructs a new NonUniqueResultException exception with the specified detail message.- Parameters:
- message- the detail message.
 
- 
NonUniqueResultExceptionConstructs a new NonUniqueResultException exception with the specified detail message.- Parameters:
- message- the detail message.
- cause- another exception or error that caused this exception. Null indicates that no other cause is specified.
 
- 
NonUniqueResultExceptionConstructs a new NonUniqueResultException exception with the specified cause.- Parameters:
- cause- the cause.
 
 
-