Table of Contents

TObjectManager.Replicate<E> Method

Replicates a transient entity into the manager, returning the corresponding persistent instance.

Remarks

Behaves identically to Merge, except that when no record with the given identifier is found in the database, a new record is inserted instead of raising an exception. Use this method to replicate data from external sources where you want to insert or update regardless of whether the record already exists.

Syntax

Unit: Aurelius.Engine.ObjectManager

function TObjectManager.Replicate(Entity: E): E;

Parameters

<-> Parameter Type Description
Entity E The transient entity whose values are replicated into the managed instance.

Returns

The persistent managed instance updated with the values of Entity.

Type Parameters

Type Parameter Description
E The entity class type.

See also