Skip to content

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

@nirinchev

Description

@nirinchev

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions