realm / realm-js

Realm is a mobile database: an alternative to SQLite & key-value stores
https://realm.io
Apache License 2.0
5.76k stars 572 forks source link

receiving Realm.Dictionary when trying to save nested objects in mixed type #6892

Open vinibgoulart opened 1 week ago

vinibgoulart commented 1 week ago

How frequently does the bug occur?

Always

Description

I have this schema:

export const Example: ObjectSchema = {
  name: 'Example',
  properties: {
    filters: {
      type: 'mixed',
      optional: true,
    },
  },
};

Trying to save this in the schema:

realm.write(() => {
      example.filters = {
        test: {
          blabla: 'blabla',
        },
      };
    });

Receiving this in the database snapshot:

Example: {
  filters: {
    test: [Realm.Dictionary]
  }
}

Expected output:

Example: {
  filters: {
    test: {
      blabla: 'blabla',
    }
  }
}

Stacktrace & log output

No response

Can you reproduce the bug?

-- select --

Reproduction Steps

No response

Version

12.3.1

What services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

IOS

Build environment

Which debugger for React Native: ..

Cocoapods version

No response

sync-by-unito[bot] commented 1 week ago

➤ PM Bot commented:

Jira ticket: RJS-2905