Details
Description
detail is here
table Imb_MicroBlog
public class Imb_MicroBlog{
|
public Guid _id { get; set; }
|
public Guid createUserID { get; set; }
|
public List<Imb_Comment> commentList { get; set; }
|
public bool isAudit{ get; set ; }
|
public string content{ get; set ; }
|
}
|
table Imb_Comment
public class Imb_Comment{
|
public Guid _id { get; set; }
|
public Guid createUserID { get; set; }
|
public bool isAudit{ get; set ; }
|
public string content{ get; set ; }
|
}
|
when i want to match nested Imb_Comment's cloumns isAudit=true and Slice them
C# like this
collection.Find(
|
Query.And(
|
Query.EQ("_id", microblogID),
|
Query.EQ("commentList.isAudit", True)
|
)
|
)
|
.SetFields(Fields.Slice("commentList", skip, limit))
|
.ToList()
|
[0].commentList[0].replyList.Count;
|
but it match all rows include isAudit=false, i don't how to query nested item ,hope help me thanks very much