0
我有一個模型在Cosmos DB中存在,我有一些從其他類型繼承的類型。喜歡的東西:
class ParentType {
public string name;
}
class ChieldTypeOne : ParentType {
public string propertyA;
}
class ChieldTypeTwo : ParentType {
public string propertyB;
}
class ThirdType {
public List<ParentType> Parents;
}
當我試圖查詢所有ThirdType文件,其中Parent.propertyB =「someValue中」,使用LINQ,我發現我不能與宇宙DB .NET客戶端使用TypeOf運算<>。我嘗試使用SQL,但我不知道如何查詢名稱中以$開頭的字段來查詢$ type字段,這是由Json.NET創建的,用於區分文檔類型。
有人遇到過這種情況,找到了解決辦法嗎?
THKS,
路易斯