Using nest to make a Join or an alternative more performant query


(farhad) #1

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.


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.