I have an other question regarding the filtering, nested denormalization so I don’t want to open a new thread.
Suppose that given the above example I have an other 1-N relationship between the “Employees” and “Pets” collections where the Pets have a String field called “type” which can be “dog” or “cat”.
Lets say that I’d like to find only the companies that have employees who have dogs.
Would it be possible?
I tried something like this but I didn’t get what I wanted:
Whenever I try to do a query based on “employeesCache” it’s not working as I would expect it to be.
Is something like this possible with grapher or should I modify my database?
I also tried to do a regular query like this:
But this also gives me the id’s of the companies, pets (without the employees/name, type fields) that did not match the query, can I avoid this somehow?
The queried documents look like this:
[ //I want this
employees: [ [Object], [Object] ]
//I don't need this