company logo

LOID

Local object identities are used for accessing data instances within an ODABA database. Thus, they are typically used in WEB applications as parameter to WEB pages that shall display information about a specific object.

LOIDs may change when copying an instance or the whole database. Since LOIDs are stable within a given database, only, they should not be used outside the "process" that has determined the LOID, except they are used just for identification but not for data access in the database (e.g. as identifier in an XML file).

Reading LOID

The local object identity can be provided in different ways. The LOID is a numerical value that can be retrieved from the property handle for the currently selected instance. Another way is requesting the LOID from the index, which might perform better in many cases, since no instance need to be read.

The LOID can also be accessed as an instance property, because it is considered a property of any persistent instance.

... fragment ( Property &person ) {

  persons.loid("Miller|Paul");  // get LOID for Paul Miller

  persons.value("__LOID").toString();  // get LOID string

}