Id class

Annotation Id can be used to specify an entity ID property if it's named anything else then "id" (case insensitive).

Constructors

Id({bool assignable = false})
Create an Id annotation.
const

Properties

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.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited