Open ssteiner opened 7 months ago
Hmm.. so I finally figured out what's going on by looking at the raw query again. The prop I'm trying to search for is _id
in the JSON. so if I write
SELECT $ FROM phoneBookCategorys INCLUDE PhoneBooks WHERE $.PhoneBooks[*]._id ANY IN [GUID('2d66ceca-91bd-4e68-a8d0-e7e19af65169')]
then things work as expected. I wish there were an error like 'there's no property called Id $.PhoneBooks[*]' (the ANY now works as expected)
Here's my document
what I would like is to query the ILiteCollection returning all documents that have a
PhoneBook
matching a list of Ids.using Linq Syntax I'd write
That doesn't work for known reasons. So I tried to write it using the Query helpers:
That runs, but it returns all
PhoneBookCategory
objects hat have no PhoneBooks, not allPhoneBookCategory
that are in myList.What am I missing?
I tried doing it raw in LiteDB Studio, came up with this:
SELECT $ FROM phoneBookCategorys INCLUDE PhoneBooks WHERE $.PhoneBooks[*].Id ALL IN GUID('2d66ceca-91bd-4e68-a8d0-e7e19af65169')
and still... withALL
I'm getting my 3 records that have an emptyPhoneBooks
collection, withANY
, I get zero results.Here's one raw document from the DB - I'd expect this to be found with the GUID I'm providing