You are here: Basics Operations & Concepts > Update Concept > Transparent Persistence > Transparent Persistence Implementation

Transparent Persistence Implementation

The basic logic of Transparent Persistence (TP) is the following:

Note that Transparent Persistence is based on Transparent Activation, so it is strongly recommended to study the Transparent Activation documentation first.

In order to make use of Transparent Persistence you will need:

  1. Enable Transparent Activation (required for binding object instances to the TP framework) on the database level:

    .NET: configuration.Common.Add(new TransparentPersistenceSupport());

  2. Implement IActivatable interface for the persistent classes, either manually or through using enhancement tools.
  3. Call activate method at the beginning of all class methods that modify class fields:

    .NET Activate(ActivationPurpose.Write)

Note that TransparentPersistenceSupport configuration implicitly adds TransparentActivationSupport. The fact is, that before modification each field object should be loaded into the reference cache and that is the job of TA. So TA should be utilized in any case before TP. You can also note that the way TA and TP links into objects is absolutely identical: TP also uses the same activate call, but in this case its purpose is WRITE.