I have a simple class Foobar that contains a list of Objects that have a name.
These are stored using DBRefs.
What i wanna do is search for Foobars where one of these objects name is something.
JSON of Foobar looks like this:
This does not work (of course)
But this doesn't work as well:
Query query = new Query();
List<Foobar> find = template.find("foobar", query, Foobar.class);
(Doesn't work means i don't get the expected result, i get an empty list)
Is it even possible to query across documents using DBRefs?
Do i have to store them embedded if i want to be able to do so?