Prepares the save call using a newly generated id.

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

Syntax

C#
protected virtual Object SaveWithGeneratedId(
	Object entity,
	string entityName,
	Object anything,
	IEventSource source,
	bool requiresImmediateIdAccess
)
Visual Basic
Protected Overridable Function SaveWithGeneratedId ( _
	entity As Object, _
	entityName As String, _
	anything As Object, _
	source As IEventSource, _
	requiresImmediateIdAccess As Boolean _
) As Object
Visual C++
protected:
virtual Object^ SaveWithGeneratedId(
	Object^ entity, 
	String^ entityName, 
	Object^ anything, 
	IEventSource^ source, 
	bool requiresImmediateIdAccess
)

Parameters

entity
Type: System..::..Object
The entity to be saved
entityName
Type: System..::..String
The entity-name for the entity to be saved
anything
Type: System..::..Object
Generally cascade-specific information.
source
Type: NHibernate.Event..::..IEventSource
The session which is the source of this save event.
requiresImmediateIdAccess
Type: System..::..Boolean
does the event context require access to the identifier immediately after execution of this method (if not, post-insert style id generators may be postponed if we are outside a transaction).

Return Value

The id used to save the entity; may be null depending on the type of id generator used and the requiresImmediateIdAccess value

See Also