Table of Contents

TAureliusManager.Merge<E> Method

Merges a transient entity into the manager and returns the persistent (managed) entity instance with the same identifier.

Remarks

If no persistent entity with the same identifier exists in the manager, Aurelius will try to load it from the database. If it is not found in the database either, an exception is raised. To insert a new object if it does not exist, use Replicate instead. Call Flush afterwards to persist the changes to the database.

Syntax

Unit: Aurelius.Comp.Manager

function TAureliusManager.Merge(Entity: E): E;

Parameters

<-> Parameter Type Description
Entity E The transient entity whose data will be copied into the persistent instance. This object remains transient after the call.

Returns

The persistent entity instance inside the manager, updated with the data from Entity.

Type Parameters

Type Parameter Description
E The entity class type.

See also