EntityFlags

public enum EntityFlags : UInt32

Not really an enum, but binary flags to use across languages

  • T

    Undocumented

    Declaration

    Swift

    public typealias T = UInt32
  • Undocumented

    Declaration

    Swift

    public static var byteSize: Int { get }
  • Undocumented

    Declaration

    Swift

    public var value: UInt32 { get }
  • Use the default (no arguments) constructor to create entities

    Declaration

    Swift

    case useNoArgConstructor = 1
  • Enable “data synchronization” for this entity type: objects will be synced with other stores over the network. It’s possible to have local-only (non-synced) types and synced types in the same store (schema/data model).

    Declaration

    Swift

    case syncEnabled = 2
  • Makes object IDs for a synced types (SYNC_ENABLED is set) global. By default (not using this flag), the 64 bit object IDs have a local scope and are not unique globally. This flag tells ObjectBox to treat object IDs globally and thus no ID mapping (local <-> global) is performed. Often this is used with assignable IDs (ID_SELF_ASSIGNABLE property flag is set) and some special ID scheme. Note: typically you won’t do this with automatically assigned IDs, set by the local ObjectBox store. Two devices would likely overwrite each other’s object during sync as object IDs are prone to collide. It might be OK if you can somehow ensure that only a single device will create new IDs.

    Declaration

    Swift

    case sharedGlobalIds = 4
  • max

    Undocumented

    Declaration

    Swift

    public static var max: EntityFlags { get }
  • min

    Undocumented

    Declaration

    Swift

    public static var min: EntityFlags { get }