getObjectList

abstract fun getObjectList(propertyName: String): RealmList<out DynamicRealmObject>

Returns the list of objects referenced by the property name as a RealmList.

The class argument must be the KClass of the RealmStorageType for the property.

To retrieve values, objects or list of value elements use the get<X>Value, getObject and other get<X>List variants.

Return

the referenced RealmList

Parameters

propertyName

the name of the list property to retrieve the list for.

clazz

the Kotlin class of the list element type.

T

the type of the list element type.

Throws

if the class doesn't contain a field with the specific name, if trying to retrieve values for non-list properties or if clazz doesn't match the property's RealmStorageType.kClass.