set

abstract fun <T> set(propertyName: String, value: T): DynamicMutableRealmObject

Sets the value for the given field.

If value is an unmanaged RealmObject it will copied into the realm, just as for normal assignments through the object setters of the typed API and MutableRealm.copyToRealm.

Return

this object.

Parameters

propertyName

the name of the property to update.

value

the new value of the property.

T

the type of the value.

Throws

if the class doesn't contain a field with the specific name, or if the value doesn't match the RealmStorageType.kClass type of the property.


open fun set(vararg pairs: Pair<String, Any?>): DynamicMutableRealmObject