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

Type issues with Unmanaged<T, RequiredProperties>

      How frequently does the bug occur?

      Always

      Description

      When using Realm classes, we noticed a few type issues all related to Unmanaged<T, RequiredKeys>.

      1. When specifying the RequiredProperties in Realm.Object<T, RequiredProperties>, the properties of type Realm.List or Realm.Dictionary are not allowed.
      2. If RequiredProperties is not provided when defining the class, the constructor accepts string as values.
      3. Unmanaged nested Realm.Object is not allowed in Realm.create. It's also reported in #5940

      The details are available in the mini repo I attached.

      If anyone is interested, I made a patch to resolve the issue 1 & 3 for now. https://gist.github.com/Yupeng-li/655eaf75f46086c4345a78e27dfa3c5e

      Stacktrace & log output

      No response

      Can you reproduce the bug?

      Always

      Reproduction Steps

      Please check this codesandbox mini repo for details. (Please ignore the browser view on the right hand side. )

      Version

      11.7 & 11.9

      What services are you using?

      Local Database only

      Are you using encryption?

      Yes

      Platform OS and version(s)

      All

      Build environment

      Which debugger for React Native: ..

      Cocoapods version

      No response

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

              Created:
              Updated: