How does MongoDB Realm Sync handle updating objects with no changes?"

Hello,

I am using MongoDB Realm Sync in my application, and I have a question about how Sync handles objects that have not been modified.

If I use copyToRealm() on an object that already exists in the local Realm and no fields have been changed (i.e., all values are the same as those already in the database), does Realm Sync still send an update to MongoDB Atlas even though there are no actual data changes?

I would like to better understand how Sync behaves in these cases to optimize data synchronization in my app.

Thank you!

Hey, you use copyToRealm() on an object that hasn’t actually changed, Realm Sync will not send an update to MongoDB Atlas.

This lets you freely use copyToRealm() without worrying about redundant data synchronization, which makes the sync process in your application faster.