Prabhtej Singh
Prabhtej Singh

Reputation: 345

Realm copyToRealmOrUpdate v/s insertOrUpdate

Whats the difference in copyToRealmOrUpdate v/s insertOrUpdate in Realm while saving object. Which one should be considered to apply?

Upvotes: 2

Views: 1739

Answers (1)

a0x2
a0x2

Reputation: 2121

insertOrUpdate() is a new method introduced in 1.1.0 that has none of the performance issues of copyToRealmOrUpdate.

The biggest visible difference is that insertOrUpdate() doesn't return the added objects, which allowed the team to optimize it much more heavily.

Upvotes: 5

Related Questions