Entity

public protocol Entity : AnyObject

Base protocol of anything you want to persist in a box.

Persisted Properties

All stored properties of a type that conforms to Entity will be persisted, if possible. For numbers, ObjectBox recognizes Bool, Int8, Int16, Int32, Int64, Int, Float, and Double. It also recognizes String and Date.

Relations

To create relations between entities, use ToOne and ToMany to wrap the target type, like customer: ToOne<Customer>.

  • Undocumented

    Declaration

    Swift

    init()