table
and field
FlatBuffer schema elements. Annotated
, time
.objectbox:
and is followed by one or more annotations, separated by commas.name
annotation). See e.g. Annotated
, relId
.fullName
showing both variants.objectbox:relation(name=authors,to=Author)
sync(sharedGlobalIds)
can be used to switch from the default behaviour (ID-mapping) to using a global ID space. This flag tells ObjectBox to treat object IDs globally and thus no ID mapping (local <-> global) is performed. Often this is used with id(assignable)
annotation and some special ID scheme.id(assignable)
) to switch from the default (ObjectBox assigns object IDs during insert, following auto-increment order). This will allow putting an object with any valid ID. You can still set the ID to zero to let ObjectBox auto-assign a new ID.date/date-nano
properties in time-series databases.hash
for string, value
for others).value
- uses property values to build the index. For string, this may require more storage than a hash-based index.hash
- uses a 32-bit hash of property value to build the index. Occasional collisions may occur which should not have any performance impact in practice (with normal value distribution). Usually, a better choice than hash64
, as it requires less storage.hash64
- uses a long hash of property values to build the index. Requires more storage than hash
and thus should not be the first choice in most cases.put
operation will abort and return an error if the unique constraint is violated.