I’ve this realm object with a map property:
class UserModel: Object {
@Continued var uploadMap = Map<String, UploadingModel>()
}
the place UploadingModel is one other realm object.
as soon as I ran the app I acquired this error:
*** Terminating app on account of uncaught exception 'RLMException',
motive: 'Map<String, UploadingModel> property
'uploadMap' have to be marked as non-obligatory.'
Within the official documentation: realm-swift there’s an instance that initialize the map just like the above with out marking it as non-obligatory.
Additionally, I take advantage of different realm varieties like Checklist<UploadingModel>()
and no error is thrown.
How can I keep away from mark it as non-obligatory and why the error is thrown?