Entity class Null safety
Entity annotation is used on a class to let ObjectBox know it should store it - making the class a "persistable Entity".
This annotation is matched by ObjectBox code generator when you call
pub run_build_runner build. The generator creates
all the binding code necessary to store the class in the database.
- hashCode → int
The hash code for this object. [...]
- realClass → Type?
Actual type this entity represents. ObjectBox will use it instead of the
@Entity()-annotated class's name. For example: [...]final
- runtimeType → Type
A representation of the runtime type of the object.
- uid → int?
ObjectBox keeps track of entities and properties by assigning them unique
identifiers, UIDs, during the code-generation phase. All those UIDs are
stored in a file objectbox-model.json in your package and are looked up by
name. If the name changes a new uid is assigned, effectively creating a
new Entity in the database. [...]