Supposedly I have a database structure like this
Person ('name', 'age')
Belonging ('person', 'type')
with its relationship like this
Person -> Belongings (one to many)
and I want to query all person with their number of belongings included like this
Array[0] -> name, age, numberOfBelongings,
Array[1] -> name, age, numberOfBelongings,
etc
How do I do this? I tried to use CloudCode but, it turned out the fetching method is asynchronous, so I can't fetch the number of belongings to each person.