Reputation: 345
Whats the difference in copyToRealmOrUpdate v/s insertOrUpdate in Realm while saving object. Which one should be considered to apply?
Upvotes: 2
Views: 1739
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