c# - Problems Querying nested lists in RavenDB -
i want use ravendb project doing, before can, need figure out how query nested objects... let me explain have class this:
public class customer { public string id { get; set; } public string name { get; set; } public ilist<orders> { get; set; } }
then order class:
public class order { public int ordernumber { get; set; } public decimal orderamount { get; set; } public bool customerbilled { get; set; } }
i create bunch of fake data , add raven -- customers have orders customerbilled set true, customerbilled set false, , mix of true , false on customerbilled.
what need with, figuring out how extract list of customers 1 or more orders customerbilled set false.
how create query it? can't seem 1 work, , have no idea how.
the dynamic queries in ravendb can handle this, think following should want (sorry can't compile code right verify)
// list of objects - linq doc in customers doc.orders.any( order => order.customebilled == false) select doc;
edit: on new link, scroll half way down section "more filtering options"
Comments
Post a Comment