Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key path information for notifications in collections in mixed #7320

Open
sync-by-unito bot opened this issue Feb 6, 2024 · 0 comments · May be fixed by #7356
Open

Key path information for notifications in collections in mixed #7320

sync-by-unito bot opened this issue Feb 6, 2024 · 0 comments · May be fixed by #7356

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Feb 6, 2024

To improve uses of the collection in mixed feature, the SDKs would like to receive key path information about the exact changes, when receiving notifications about changes inside a mixed field or hierarchy of such.

The key-path information could be expressed in a format similar to the representation in https://github.com/realm/realm-core/blob/next-major/src/realm/path.hpp

If the same exact key-path information could be provided for normal object notifications in the same go, then it is a plus, but not a requirement for this task.

Original request popped out of SDK discussions in: https://docs.google.com/document/d/1bn4hsdJulc34Ll9KDNG3_nWXLF8CzheXU3x6ZxxAagw/edit#heading=h.j8cg1emgd52y

final subscription = obj.changes.listen((event) {
  console.log(event);
});

realm.write(() {
  obj.mixed.asList.add(RealmValue.bool(true)); 
}); 

realm.write(() {
  obj.mixed.asList()[1].asMap()['list'] = RealmValue.from([10]);
});

// logged: 'mixed', 'mixed' - should we include keypath info, otherwise
// it's quite useless for fine-grained updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

0 participants