LinkingObjects
LinkingObjects
is an auto-updating container type. It represents zero or more objects that are linked to its owning
model object through a property relationship.
LinkingObjects
can be queried with the same predicates as List<Element>
and Results<Element>
.
LinkingObjects
always reflects the current state of the Realm on the current thread, including during write
transactions on the current thread. The one exception to this is when using for...in
enumeration, which will always
enumerate over the linking objects that were present when the enumeration is begun, even if some of them are deleted or
modified to no longer link to the target object during the enumeration.
LinkingObjects
can only be used as a property on Object
models. Properties of this type must be declared as let
and cannot be dynamic
.
-
Creates an instance of a
LinkingObjects
. This initializer should only be called when declaring a property on a Realm model. -
A human-readable description of the objects represented by the linking objects.
-
Returns the object at the given
index
.