Update the persistent instance with the identifier of the given detached instance.

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

Syntax

C#
void Update(
	string entityName,
	Object obj
)
Visual Basic
Sub Update ( _
	entityName As String, _
	obj As Object _
)
Visual C++
void Update(
	String^ entityName, 
	Object^ obj
)

Parameters

entityName
Type: System..::..String
The Entity name.
obj
Type: System..::..Object
a detached instance containing updated state

Remarks

If there is a persistent instance with the same identifier, an exception is thrown. This operation cascades to associated instances if the association is mapped with cascade="save-update".

See Also