user1932923
user1932923

Reputation: 384

Query using JOIN in document db

I have multiple types of Documents in Document Db and store them with entityType to define it's Type.

I can get individual lists of entityType(s) separately and then use a query like below to get the items which already doesn't belong in second list.

list1.Value.Where(u => !secondList.Any(u2 => u2.ITId == u.Id)).ToList();

I was wondering is it possible to the same thing in Document Db using Join or any other way?

Upvotes: 1

Views: 2112

Answers (1)

Mikhail Shilkov
Mikhail Shilkov

Reputation: 35154

Cosmos DB JOIN operation is limited to the scope of a single document: you join parent object with child objects under same document.

Cross-document joins are not supported, so you would have to implement such query yourself.

Upvotes: 2

Related Questions