Does Realm actually support optional arrays?

I can’t get any optional arrays to work at all.

certifications: {
  type: 'list',
  objectType: 'Certification',
  optional: true
},

Given that in a Schema file, I always get an error message list Property ‘Person.certifications’ of type ‘array’ cannot be nullable. If I make it optional: false, it works fine. Additionally, the data being persisted is an emptry Array .

Arrays of optional elements is not something currently supported, but it’s something we eventually want to support.

1 Like

Good to know. Thanks for the info.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.