Re-read the state of the given instance from the underlying database.

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

Syntax

Visual Basic (Declaration)
Sub Refresh ( _
	obj As Object _
)
C#
void Refresh(
	Object obj
)
Visual C++
void Refresh(
	Object^ obj
)
JavaScript
function refresh(obj);

Parameters

obj
Type: System..::.Object
A persistent instance

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.

For example, Where a database trigger alters the object state upon insert or update After executing direct SQL (eg. a mass update) in the same session After inserting a Blob or Clob

See Also