Copy the state of the given object onto the persistent object with the given identifier. If there is no persistent instance currently associated with the session, it will be loaded. Return the persistent instance. If there is no database row with the given identifier, save the given instance and return it as a newly persistent instance. Otherwise, the given instance does not become associated with the session.

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

Syntax

C#
[ObsoleteAttribute("No direct replacement. Use Merge instead.")]
Object SaveOrUpdateCopy(
	Object obj,
	Object id
)
Visual Basic
<ObsoleteAttribute("No direct replacement. Use Merge instead.")> _
Function SaveOrUpdateCopy ( _
	obj As Object, _
	id As Object _
) As Object
Visual C++
[ObsoleteAttribute(L"No direct replacement. Use Merge instead.")]
Object^ SaveOrUpdateCopy(
	Object^ obj, 
	Object^ id
)

Parameters

obj
Type: System..::..Object
a persistent or transient instance with state to be copied
id
Type: System..::..Object
the identifier of the instance to copy to

Return Value

an updated persistent instance

See Also