Giving the following schema -->
const Person = {
name: "User",
primaryKey: "_id",
properties: {
_id: "objectId",
name: "string",
age: "number",
company: "Company[]"
}
};
const Company = {
name: "Company",
primaryKey: "_id",
properties: {
_id: "objectId",
name: "string",
boss: {
type: 'linkingObjects',
objectType: 'Person',
property: 'company'
}
}
};
After adding some persons and several of them with a company, I try to filter by age and get the ones that are over 30 years with -> realm.objects("Person").filtered("age > 30");
The result of this query is the following error -> Maximum call stack size exceeded.
I expect to have a list of Persons which meets the requirement but instead I have this error. I have seen that in the release 10.0.0 this error is suppose to be fix for toJSON() and indeed if I try to filter the object by its id everything works fine but once I try to get a list of some objects I get this error.
Does somebody have a solution for this?