commonMain.io.realm.kotlin.UpdatePolicy.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of library-base-jvm Show documentation
Show all versions of library-base-jvm Show documentation
Library code for Realm Kotlin. This artifact is not supposed to be consumed directly, but through 'io.realm.kotlin:gradle-plugin:1.11.1' instead.
package io.realm.kotlin
/**
* Update policy that controls how to handle import of objects with existing primary keys when
* import them with [MutableRealm.copyToRealm] and
* [io.realm.kotlin.dynamic.DynamicMutableRealm.copyToRealm].
*
* @see MutableRealm.copyToRealm
* @see DynamicMutableRealm.copyToRealm
*/
public enum class UpdatePolicy {
/**
* Update policy that will disallow updating existing objects and instead throw an exception if
* an object already exists with the same primary key.
*/
ERROR,
/**
* Update policy that will update all properties on any existing objects identified with the same
* primary key. Properties will be marked as updated in change listeners, even if the property
* was updated to the same value.
*/
ALL,
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy