company logo

Transient collections

Often, query results are stored in transient collections. transient collections may refer to persistent or transient instances. Transient or temporary collections may be defined in the database model as extents or references or as property handle in an application.

When referring to transient property handles, which are part of the database model (i.e. as extent or property definition), collections may be accessed by different property handles in the application. Defining transient collections by means of property handles creates collections, which are available in the given application context, only (local transient collections).

How to define transient collections within the data model is described in "Object space extents" and "Reference collections".

Creating local transient collections is possible explicitly by calling Property::open() function. Depending on transient, weak-typed and owning option the collection may be created as transient/temporary, weak-typed/typed and owning/not owning collection. Local transient collections are created automatically, when calling set operations as intersect() or select().

  Property persons;

// open transient collection for persons

  persons.open(os,"Person","pk","",false,false,true);

// open temporary collection for persons

  persons.open(os,"Person","pk","",false,false,false);

// open transient weak-typed collection for persons

  persons.open(os,"Person","pk","",true,false,true);

// open transient owning collection for persons

  persons.open(os,"Person","pk","",false,true,true);