You've to do that in your application layer. If you're using an ORM, it could use annotations (or something similar) to pull references that exist in other collections. I only have worked with Morphia, and the @Reference
annotation fetches the referenced entity when queried, so I am able to avoid doing it myself in the code.