@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public protocol ObjectKeyIdentifiable : Identifiable
A protocol which defines a default identity for Realm Objects
Declaring your Object subclass as conforming to this protocol will supply a default implementation for Identifiable
‘s id
which works for Realm Objects:
// Automatically conforms to `Identifiable`
class MyObjectType: Object, ObjectKeyIdentifiable {
// ...
}
You can also manually conform to Identifiable
if you wish, but note that using the object’s memory address does not work for managed objects.
The stable identity of the entity associated with self
.
Swift
var id: UInt64 { get }
Self
: ObjectBase
id
Default implementation Default Implementation
A stable identifier for this object. For managed Realm objects, this value will be the same for all object instances which refer to the same object (i.e. for which Object.isSameObject(as:)
returns true).
Swift
public var id: UInt64 { get }
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4