Re-read the state of the given instance from the underlying database, with
the given LockMode.
Namespace:
NHibernateAssembly: NHibernate (in NHibernate.dll)
Syntax
Visual Basic (Declaration) |
---|
Sub Refresh ( _ obj As Object, _ lockMode As LockMode _ ) |
C# |
---|
void Refresh( Object obj, LockMode lockMode ) |
Visual C++ |
---|
void Refresh( Object^ obj, LockMode^ lockMode ) |
JavaScript |
---|
function refresh(obj, lockMode); |
Parameters
- obj
- Type: System..::.Object
a persistent or transient instance
- lockMode
- Type: NHibernate..::.LockMode
the lock mode to use
Remarks
It is inadvisable to use this to implement long-running sessions that span many
business tasks. This method is, however, useful in certain special circumstances.