程序包 org.hibernate

类 ObjectNotFoundException

  • 所有已实现的接口:
    Serializable

    public class ObjectNotFoundException
    extends UnresolvableObjectException
    Thrown when Session.load() fails to select a row with the given primary key (identifier value). This exception might not be thrown when load() is called, even if there was no row on the database, because load() returns a proxy if possible. Applications should use Session.get() to test if a row exists in the database.

    Like all Hibernate exceptions, this exception is considered unrecoverable.
    作者:
    Gavin King
    另请参阅:
    序列化表格
    • 构造器详细资料

      • ObjectNotFoundException

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