Space Object ID
How Space Object ID is Generated?
You can insert an object into the space using the Write()
and WriteMultiple()
methods. When a new object is inserted into the space, it embeds a unique ID - called the UID. The UID can be generated explicitly by the client using a unique value generated by the application business logic or using a sequencer running within the space.
The space UID for space object can be created in three different ways:
- When a space object has no
SpaceId
property declared, the space generates a UID for the object. - When a space object has a property which is declared as
SpaceId
and marked asauto-generate=false
, the UID is generated based on the value of the ID field the user is setting. - When a space object has a property which is declared as
SpaceId
and marked asauto-generate=true
, the UID is generated by the space and placed back into the field using the relevant setter method. In this case, the field must be aString
type.
The SpaceId Field content
- When a space Class has no
SpaceId
property declared, it will be returned without any ID. This means that update operations cannot be executed on the space Class. Only theRead()
andWrite()
methods can be executed. - When a space Class has a property which is declared as
SpaceId
andauto-generate=true
and its value isnull
, theSpaceId
field will store the ID. - When a space Class has a property which is declared as
SpaceId
andauto-generate=true
and its value is not null, theSpaceId
field will store the original value stored within theSpaceId
field. - When a space Class has a property which is declared as
SpaceId
andauto-generate=false
, theSpaceId
field will store the original value stored within theSpaceId
field used to generate the UID.