getObjectSet
Returns the set of objects referenced by the property name as a RealmSet.
The class
argument must be the KClass of the RealmStorageType for the property.
The following snippet outlines the different functions available for the different set types:
// Retrieve a set of nullable ints from a 'nullableIntSet' property
dynamicRealmObject.getNullableValueSet("nullableIntSet", Int::class)
// Retrieve a set of non-nullable ints from a 'intSet' property
dynamicRealmObject.getValueSet("intSet", Int::class)
// Retrieve a set of objects from an `objectSet' property
// Object sets are ALWAYS non-nullable
dynamicRealmObject.getObjectSet("objectSet", DynamicRealmObject::class)
Content copied to clipboard
Return
the referenced RealmSet
Parameters
propertyName
the name of the set property to retrieve the set for.
Throws
if the class doesn't contain a field with the specific name, if trying to retrieve values for non-set properties or if clazz
doesn't match the property's RealmStorageType.kClass.