Called when an object is detected to be dirty, during a flush.

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

Syntax

Visual Basic (Declaration)
Function OnFlushDirty ( _
	entity As Object, _
	id As Object, _
	currentState As Object(), _
	previousState As Object(), _
	propertyNames As String(), _
	types As IType() _
) As Boolean
C#
bool OnFlushDirty(
	Object entity,
	Object id,
	Object[] currentState,
	Object[] previousState,
	string[] propertyNames,
	IType[] types
)
Visual C++
bool OnFlushDirty(
	Object^ entity, 
	Object^ id, 
	array<Object^>^ currentState, 
	array<Object^>^ previousState, 
	array<String^>^ propertyNames, 
	array<IType^>^ types
)
JavaScript
function onFlushDirty(entity, id, currentState, previousState, propertyNames, types);

Parameters

entity
Type: System..::.Object
id
Type: System..::.Object
currentState
Type: array< System..::.Object >[]()[]
previousState
Type: array< System..::.Object >[]()[]
propertyNames
Type: array< System..::.String >[]()[]
types
Type: array< NHibernate.Type..::.IType >[]()[]

Return Value

trueTruetruetrue (True in Visual Basic) if the user modified the currentState in any way

Remarks

The interceptor may modify the detected currentState, which will be propagated to both the database and the persistent object. Note that all flushes end in an actual synchronization with the database, in which as the new currentState will be propagated to the object, but not necessarily (immediately) to the database. It is strongly recommended that the interceptor not modify the previousState.

See Also