CosmosDb quering 2 object types in same collection and same partition -


i have 2 document types in same collection: order, shipping. relation is: 1 shipping have 1 or many orders. 'order' have shipping_id. select orders listing properties of shipping. rdbms talking classic join can't find solution documentdb. idea?

cosmosdb not rdbms. reason have perform 2 queries. first, retrieve shipping(s) you're interested in , issue query retrieving order(s) based on shipping_id. if know shipping_id ahead of time, can issue these queries in parallel using task.whenall. option wrap logic inside of stored procedure. allow results you're looking single operation.


Comments