Class NonUniqueResultException

All Implemented Interfaces:
Serializable

public class NonUniqueResultException extends IllegalStateException
Thrown to indicate that a query returned more than one result when exactly one was expected.

This exception is typically used in scenarios where unique results are required, such as in methods that retrieve a single entity, but the result set contains multiple records.

See Also:
  • Constructor Details

    • NonUniqueResultException

      public NonUniqueResultException(String message, Throwable cause)
      Constructs a NonUniqueResultException with the specified detail message and cause.
      Parameters:
      message - the detail message explaining the reason for the exception
      cause - the underlying cause of the exception, which may be null