© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Denny Trebbin
Lead Fullstack Developer. Experimenting with bleeding-edge tech. Irregularly DJ. Hobby drone pilot. Amateur photographer.
If both documents share the same relational property then you can use db.collection.update(). docs.mongodb.org/manual/reference/method/db.colle…
But I cannot imagine how such is-friend-of relation can be described to allow a multi-document update.
In CouchDB, we've used a relationship document which described the relation between business objects. With MongoDB, you can do this too. The question is how are you structuring your data?
Sara Vogel
Lady JavaScript Programmer from Germany
Is there any node module/mongoose plugin for this? How do others handle follow-following system in MongoDB?