Uploaded image for project: 'Realm Core'
  1. Realm Core
  2. RCORE-1967

Key path information for notifications in collections in mixed

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None

      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

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            claus.rorbech@mongodb.com Claus Rørbech (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: