getObjectDictionary
Returns the dictionary of objects referenced by the property name as a RealmDictionary.
The class
argument must be the KClass of the RealmStorageType for the property.
The following snippet outlines the different functions available for the different dictionary types:
// Retrieve a dictionary of nullable ints from a 'nullableIntDictionary' property
dynamicRealmObject.getNullableValueDictionary("nullableIntDictionary", Int::class)
// Retrieve a dictionary of non-nullable ints from a 'intDictionary' property
dynamicRealmObject.getValueDictionary("intDictionary", Int::class)
// Retrieve a dictionary of objects from an `objectDictionary' property
// Object dictionaries are ALWAYS nullable
dynamicRealmObject.getObjectDictionary("objectDictionary", DynamicRealmObject::class)
Content copied to clipboard
Return
the referenced RealmDictionary
Parameters
propertyName
the name of the dictionary property to retrieve the dictionary for.
Throws
if the class doesn't contain a field with the specific name, if trying to retrieve values for non-dictionary properties or if clazz
doesn't match the property's RealmStorageType.kClass.