company logo

PropertyHandle :: GetGUID - Get global identity string for the current instance

The function returns the global instance identity (GUID) for the current instance. This identity is unique within all ODABA databases. GUIDs are available for instances that are derived directly or indirectly from __OBJECT. When automatic build (GUID) is set for the structure the GUID is generated when creating the instance. Otherwise it has to be provided using ProvideGUID(). When no GUID has been defined for the structure (not derived from __OBJECT) the function returns the local object identity (LOID), which is a unique identifier within the database.

If no instance is available or no global identity has been generated for the current instance the function returns NULL.

The function returns a global instance identity also when the property handle refers to a new instance where the global identity has been set explicitly. Thus, e.g. when copying instances one might ask for the global identity that has been shipped with the source instance.

The GUID is passed in the internal result area and valid until the next property handle function call.

Return value:  GUID in string format ( NString & )

Implementation details

const NString & PropertyHandle  :: GetGUID (  )