LiteDB NoSql不返回嵌入式集合结果

时间:2018-06-05 11:23:21

标签: litedb

我目前正在测试名为liteDB的NoSQL数据库,但我无法通过嵌入式集合的值查询存储的内容。

我存储的对象属于

class Person {
  string Name;
  Operation[] Operations
}

class Operation {
  string OperationUID;
}

根据规范,我应该使用

查询
var collection = db.GetCollection<Model.Person> ("personas");
IEnumerable<Model.Person> foundOperations = collection.Find (
                            Query.EQ("Operations[*].OperationUID", 
                            getCellValue(row.GetCell (1)))); 

但这没有结果。 我将对象Person插入到集合中,但是我没有为Operation本身存储集合。

collection.Insert (person);

如果我通过人员操作进行编程,我会找到匹配但是有了数据库,最好用它来执行查询。

由于

0 个答案:

没有答案