I am not sure I understand your question but, have you looked into the data_relation
setting? See Embedded Resource Serialization. Quoting from the Limitations paragraph:
Currently we support embedding of documents by references located in any subdocuments (nested dicts and lists). For example, a query /invoices?/embedded={"user.friends":1} will return a document with user and all his friends embedded, but only if user is a subdocument and friends is a list of reference (it could be a list of dicts, nested dict, ect.). We do not support multiple layers embeddings. This feature is about serialization on GET requests. There’s no support for POST, PUT or PATCH of embedded documents.
UPDATED
If you simply want to query for documents which are referencing documents in other collections something like this would work:
?where={"reference_field":"54e328ec537d3d20bbdf2ed5"}
That's assuming reference_field
is either a list of ids (of type objectid
) or a objectid
. Also see this answer.
Hope this helps.