IdBase
public protocol IdBase : EntityPropertyTypeConvertible, Hashable
Protocol an ObjectBox ID must conform to. Currently, there are two major types that can be used as IDs:
EntityId<E>
which is a generic, type-safe ID struct- Id (or Int64) which is a simpler data type usable for IDs. Most methods that require you to specify an ID accept either type of ID.
Also used to constrain extensions:
extension Property where ValueType: IdBase { … }
(Swift doesn’t have parameterized extensions, or else
we could write where ValueType == EntityId<T>
.)