Using the definition of a belongsTo style of 1:M relationship found in this CBL article, How would one query a bucket in such a manner that each one’s many were in its results?
For example, take a bucket with only the following documents:
KV key: One
{}
KV key: Many1
{ "belongsTo": "One" }
KV key: Many2
{ "belongsTo": "One" }
KV key: Many3
{ "belongsTo": "One" }
What query could one use to get something like
[ { "ownedDocuments": ["Many1", "Many2", "Many3"]} ]
Where the row represented corresponds to One
. Is this possible to do?