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

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

Syntax

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

Parameters

entity
Type: System..::..Object

[Missing <param name="entity"/> documentation for "M:NHibernate.IInterceptor.OnFlushDirty(System.Object,System.Object,System.Object[],System.Object[],System.String[],NHibernate.Type.IType[])"]

id
Type: System..::..Object

[Missing <param name="id"/> documentation for "M:NHibernate.IInterceptor.OnFlushDirty(System.Object,System.Object,System.Object[],System.Object[],System.String[],NHibernate.Type.IType[])"]

currentState
Type: array<System..::..Object>[]()[][]

[Missing <param name="currentState"/> documentation for "M:NHibernate.IInterceptor.OnFlushDirty(System.Object,System.Object,System.Object[],System.Object[],System.String[],NHibernate.Type.IType[])"]

previousState
Type: array<System..::..Object>[]()[][]

[Missing <param name="previousState"/> documentation for "M:NHibernate.IInterceptor.OnFlushDirty(System.Object,System.Object,System.Object[],System.Object[],System.String[],NHibernate.Type.IType[])"]

propertyNames
Type: array<System..::..String>[]()[][]

[Missing <param name="propertyNames"/> documentation for "M:NHibernate.IInterceptor.OnFlushDirty(System.Object,System.Object,System.Object[],System.Object[],System.String[],NHibernate.Type.IType[])"]

types
Type: array<NHibernate.Type..::..IType>[]()[][]

[Missing <param name="types"/> documentation for "M:NHibernate.IInterceptor.OnFlushDirty(System.Object,System.Object,System.Object[],System.Object[],System.String[],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