Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-15830

[C++] Update embedded object examples

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Realm
    • Labels:
      None

      PR #20 in the realm-cpp repo updates the way embedded objects work. It looks like you can now directly access an embedded object as a member of the parent struct - i.e. some of the tests have been updated from:

      realm.write([&foo]() {
             (*foo.foo).bar = 84;
      });
      

      To:

      realm.write([&foo]() {
             foo.foo->bar = 84;
      });
      

      Update code examples for embedded objects to reflect this (much better) syntax.

            Assignee:
            dachary.carey@mongodb.com Dachary Carey
            Reporter:
            dachary.carey@mongodb.com Dachary Carey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              1 year, 14 weeks, 4 days ago