Called just before an object is initialized

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

Syntax

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

Parameters

entity
Type: System..::.Object
id
Type: System..::.Object
state
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 state in any way

Remarks

The interceptor may change the state, which will be propagated to the persistent object. Note that when this method is called, entity will be an empty uninitialized instance of the class.

See Also