Id class Null safety
Annotation Id can be used to specify an entity ID property if it's named anything else then "id" (case insensitive).
- assignable → bool
When you put a new object you don't assign an ID by default, it's assigned
automatically by ObjectBox. If you need to assign IDs by yourself, use the
@Id(assignable: true) annotation. This will allow putting an object with
any valid ID. You can still set the ID to zero an leave it to ObjectBox.
Note: in case you use assignable IDs on relation targets (with ToOne
or ToMany), you're responsible for inserting new target objects before
the source. If new objects have non-zero IDs ObjectBox has no way of
telling which objects are new and which are already saved.
- hashCode → int
The hash code for this object. [...]
- runtimeType → Type
A representation of the runtime type of the object.