3 ms·
I’ve always wished for MongoDB to have a “deepFind”, so that when I fetch a document, it will fetch the nested relations also instead of doing an aggression to
by gervwyk 5y ago
I’ve always wished for MongoDB to have a “deepFind”, so that when I fetch a document, it will fetch the nested relations also instead of doing an aggression to do the lookup. Feel like if their objectID only included a collection name reference then somehow it should be possible. Perhaps a depth parameter would use be useful for more relational data.
Congrats on the milestone! Will definitively have a look at edgeDB.
- jd_mongodb 5y agoMongoDB $graphLookup might do what you want. From the docs: Performs a recursive search on a collection, with options for restricting the search by recursion depth and query filter. https://docs.mongodb.com/manual/reference/operator/aggregation/graphLookup/ https://docs.mongodb.com/manual/reference/operator/aggregati...
- Too 5y agoThere used to be a DBLink data type containing both collection and id. But without any additional features using it. It was considered bad practice and eventually got deprecated. Since 99% of the time the collection link in a given attribute is fixed and known in advance so it’s just duplicate information.