Load the data for the object with the specified id into a newly created object using "for update", if supported. A new key will be assigned to the object. This should return an existing proxy where appropriate. If the object does not exist in the database, an exception is thrown.

Namespace:  NHibernate.Impl
Assembly:  NHibernate (in NHibernate.dll)

Syntax

Visual Basic (Declaration)
Public Function Load ( _
	clazz As Type, _
	id As Object, _
	lockMode As LockMode _
) As Object
C#
public Object Load(
	Type clazz,
	Object id,
	LockMode lockMode
)
Visual C++
public:
virtual Object^ Load(
	Type^ clazz, 
	Object^ id, 
	LockMode^ lockMode
) sealed
JavaScript
function load(clazz, id, lockMode);

Parameters

clazz
Type: System..::.Type
id
Type: System..::.Object
lockMode
Type: NHibernate..::.LockMode

Return Value

Implements

ISession..::.Load(Type, Object, LockMode)

Exceptions

ExceptionCondition
NHibernate..::.ObjectNotFoundException Thrown when the object with the specified id does not exist in the database.

See Also