Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-2460

Refactor how `UpdateMode` is applied to child objects through `Realm.create()`

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: Q3-24FY
    • Component/s: Node.js, React Native, WASM
    • None

      A previous PR provided an initial solution for how to apply UpdateMode to children when passed to Realm.create().

      That solution uses a currentUpdateMode field on the Realm instance that's accessible by TypeHelpers.ts:
      https://github.com/realm/realm-js/blob/5e2caccff9c805205939bb4932e77d44eb6748f8/packages/realm/src/TypeHelpers.ts#L265

      Another option may be to have the toBinding() function accept the update mode on invocation (the aforementioned PR does allow for passing the update mode via the options argument as below, but it is unused):
      https://github.com/realm/realm-js/blob/f7a280eb2bf0946755808fa5a94db3b836e4c143/packages/realm/src/TypeHelpers.ts#L267

      However, this also presents certain issues:

      Thus, we may want to look at various alternatives.

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: