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

Realm instances should have a complete view of their schema even when opened as non-dynamic

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

      When the user passes a schema to a Realm, we go through `Realm::update_schema` which eventually calls into `Realm::set_schema` which receives both the on-disk schema and the user-provided one. We should still use the on-disk schema because the user-provided one may be a subset of the actual.

      The impetus for this is a case where a mixed column contains a link to a table that doesn't exist in the original user schema (e.g. because it was synced by a later version of the app). If the user attempts to access the mixed property that contains the unknown object, they can get the Core Obj for it, but attempting to then construct an OS Object will fail because that requires looking up the schema which doesn't exist.

            Assignee:
            nicola.cabiddu@mongodb.com Nicola Cabiddu
            Reporter:
            nikola.irinchev@mongodb.com Nikola Irinchev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: