I have a Realm Model as follows:
export type List = {
_id: Realm.BSON.ObjectId;
allowedUserIds: Array<string>;
allowedUserNotifications: Array<AllowedUserNotification>;
date?: Date;
isActive?: boolean;
listItems: Realm.List<ListItem>;
name: string;
userId: string;
};
In a previous version of Realm, I used the following to instantiate an instance of this model:
const list: RealmInsertionModel<List> = {
_id: new ObjectId(),
allowedUserIds: [],
name,
date: adjustedDate,
isActive: true,
listItems: [],
userId: currentUser?.id ?? "1",
allowedUserNotifications: []
};
However, with the latest version of Realm, RealmInsertionModel not longer appears to be available.
My question is how do I now instantiate an instance of a model that includes Realm.List?
Thanks,
Tony