Skip to main content

This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRISOpens in a new window, see the InterSystems IRIS Migration Guide and Migrating to InterSystems IRIS, both available on the WRC Distributions pageOpens in a new window (login required).

Persistence Methods and Properties

All .NET proxy classes that represent persistent Caché classes contain several methods and properties related to database persistence. These methods and properties can be used to create new instances, delete instances, bring existing instances from storage into memory, verify that a particular instance is open in memory, and so on. The following table describes some of these methods and properties:

Method or Property
Description
Id
Returns the Caché object's object ID as type string. Note that only persistent Caché objects have object IDs.
ExistsId
Returns a bool? (Nullable) object. The Value property of this object contains true if the ID exists in the database.
OpenId
Opens the Caché object with the specified object ID on the Caché server and opens a corresponding .NET proxy object on the .NET client.
DeleteId
Deletes the Caché instance with the specified object ID from the Caché server.
Save
Saves the state of the Caché object to the database. The state of the Caché object automatically reflects the state of its .NET proxy. The first time that an object is saved, Caché assigns it an object ID. The method returns a CacheStatus object that contains information about the success or failure of the operation.
Note:

To learn more about the different kinds of Caché classes, including persistent classes, read Kinds of Classes in the Defining and Compiling Classes section of Using Caché Objects.

FeedbackOpens in a new window