Skip to main content
Previous section   Next section

IdLocation

Specifies location of the ID counter.

Synopsis

<IdLocation>^Sample.PersonD</IdLocation>
Copy code to clipboard

Value

The value of this element is a global name with optional leading subscripts.

Description

This element lets you specify the global node that contains the counter used to assign object ID values.

By default, in a persistent class definition using default storage, this global location contains the highest assigned ID for an instance of the class. However this applies only if the <IdFunction> element is set to increment and the class does not use an IdKey. The value stored at this global location is not meaningful if the <IdFunction> element is set to sequence, and the location is not assigned a value if the class uses an IdKey.

Default Value

If not specified, a value for the <IdLocation> element is generated by the class compiler. Often, the value is ^MyApp.MyClassD (where MyApp.MyClass is the class name), however, it may vary based on a number of factors. For more information on global names for persistent classes, see “Globals” in the chapter “Introduction to Persistent Objects” in Defining and Using Classes.