Package org.hibernate
Class NonUniqueResultException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- jakarta.persistence.PersistenceException
-
- org.hibernate.HibernateException
-
- org.hibernate.NonUniqueResultException
-
- All Implemented Interfaces:
Serializable
public class NonUniqueResultException extends HibernateException
Thrown when the application callsQuery.getSingleResult()
orQuery.uniqueResult()
and the query returns more than one row from the database. Unlike every other exception thrown by Hibernate, this one is recoverable!- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NonUniqueResultException(int resultCount)
Constructs aNonUniqueResultException
.
-
Method Summary
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-