Entity class

An annotation to mark a class as an ObjectBox Entity. See Entity.new.

Constructors

Entity({int? uid, Type? realClass})
Marks a class as an ObjectBox Entity. Allows to obtain a Box for this Entity from Store to persist instances (objects) of this class.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
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.
no setterinherited
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.
final

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