Thrown when ISession.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 ISession.Get() to test if a row exists in the database.

Namespace: NHibernate
Assembly:   NHibernate (in NHibernate)
Version: 1.2.0.4000

Syntax

Visual Basic (Declaration)
<SerializableAttribute> _
Public Class ObjectNotFoundException _
	Inherits UnresolvableObjectException
C#
[SerializableAttribute]
public class ObjectNotFoundException : UnresolvableObjectException
Visual C++
[SerializableAttribute]
public ref class ObjectNotFoundException : public UnresolvableObjectException

Inheritance Hierarchy

System.Object
  System.Exception
    System.ApplicationException
      NHibernate.HibernateException
        NHibernate.UnresolvableObjectException
          NHibernate.ObjectNotFoundException