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.ImplAssembly: 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); |
Return Value
Implements
ISession..::.Load(Type, Object, LockMode)
Exceptions
Exception | Condition |
---|---|
NHibernate..::.ObjectNotFoundException | Thrown when the object with the specified id does not exist in the database. |