Given the following document structures:
{
regionId:"1",
regionName:"one"
}
{
regionId:"2",
regionName:"two"
}
{
restaurantId:"1",
regionIds:["1, 2"]
}
is it possible to make a single query that will return
{
regions: [{
regionId:"1",
regionName:"one"
},
{
regionId:"2",
regionName:"two"
}]
}
I understand the joins are performance intensive so if any other alternative way that is more performant than joins would be preferable.