程序包 org.hibernate

类 NonUniqueObjectException

  • 所有已实现的接口:
    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.
    作者:
    Gavin King
    另请参阅:
    序列化表格
    • 构造器详细资料

      • NonUniqueObjectException

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

        public NonUniqueObjectException​(Serializable entityId,
                                        String entityName)
        Constructs a NonUniqueObjectException using the given information, using a standard message.
        参数:
        entityId - The identifier of the entity
        entityName - The name of the entity