LiteDB icon indicating copy to clipboard operation
LiteDB copied to clipboard

How do I index and query a collection of subdocuments using Expressions?

Open aeonblaire opened this issue 2 years ago • 0 comments

Are these correct? :

ordersCollection.EnsureIndex(order => order.Products[0].Name)

and

ordersCollection
    .Query()
        .Include(order => order.Products)
        .Where(order => order.Products[0].Name == "Awesome Product")

And also, what if Order.Products is mapped to a Product class using DbRef?

aeonblaire avatar Aug 09 '23 14:08 aeonblaire