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

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

Syntax

C#
void Refresh(
	Object obj
)
Visual Basic
Sub Refresh ( _
	obj As Object _
)
Visual C++
void Refresh(
	Object^ 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 updateAfter executing direct SQL (eg. a mass update) in the same sessionAfter inserting a Blob or Clob

See Also