During merge, replace the existing (target) value in the entity we are merging to with a new (original) value from the detached entity we are merging. For immutable objects, or null values, it is safe to simply return the first parameter. For mutable objects, it is safe to return a copy of the first parameter. For objects with component values, it might make sense to recursively replace component values.

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

Syntax

C#
Object Replace(
	Object original,
	Object target,
	Object owner
)
Visual Basic
Function Replace ( _
	original As Object, _
	target As Object, _
	owner As Object _
) As Object
Visual C++
Object^ Replace(
	Object^ original, 
	Object^ target, 
	Object^ owner
)

Parameters

original
Type: System..::..Object
the value from the detached entity being merged
target
Type: System..::..Object
the value in the managed entity
owner
Type: System..::..Object
the managed entity

Return Value

the value to be merged

See Also