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

Unable to query synchronized Realm without explicitly declaring schema

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: None

      An issue both @astigsen and I have come across.

      In local Realms, once the Realm file has been created on disk, it's possible to create an instance of Realm() and then query for a type of object without needing to specify the schema in the class constructor.

      When using the ROS event handler, there are circumstances where the schema hasn't finished downloading yet. In which case, performing a query against a Realm() that didn't have its schema explicitly declared upon creation will trigger and exception.

      An example can be found in the Realm Search repo. If the schema for accountsRealm isn't explicitly defined, performing the query for User will trigger an exception.

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

              Created:
              Updated: