Package org.hibernate

Class NonUniqueResultException

All Implemented Interfaces:
Serializable

public class NonUniqueResultException extends HibernateException
Thrown when the application calls Query.getSingleResult() or Query.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:
  • Constructor Details

    • NonUniqueResultException

      public NonUniqueResultException(int resultCount)
      Constructs a NonUniqueResultException.
      Parameters:
      resultCount - The number of actual results.
  • Method Details

    • getResultCount

      public int getResultCount()
      Get the number of actual results.
      Returns:
      number of actual results