Package org.hibernate

Class NonUniqueObjectException

All Implemented Interfaces:
Serializable

public class NonUniqueObjectException extends HibernateException
This exception is thrown when an operation would break session-scoped identity. This occurs if the user tries to associate two different instances of the same Java class with a particular identifier, in the scope of a single Session.
See Also:
  • Constructor Details

    • NonUniqueObjectException

      public NonUniqueObjectException(String message, Object entityId, String entityName)
      Constructs a NonUniqueObjectException using the given information.
      Parameters:
      message - A message explaining the exception condition
      entityId - The identifier of the entity
      entityName - The name of the entity
    • NonUniqueObjectException

      public NonUniqueObjectException(Object entityId, String entityName)
      Constructs a NonUniqueObjectException using the given information, and using a standard message.
      Parameters:
      entityId - The identifier of the entity
      entityName - The name of the entity
  • Method Details