// This is a contrived example to demonstrate duplicating // data on both sides of a relationship to enable population var PostSchema = new mongoose.Schema({ title: String, slug: String, contents: String, categories: [{ type: mongoose.Schema.Types.ObjectId, ref: 'Category' }] }); var Post = mongoose.model('Post', PostSchema); var CategorySchema = new mongoose.Schema({ name: String, posts: [{ type: mongoose.Schema.Types.ObjectId, ref: 'Post' }] }); var Category = mongoose.model('Category', CategorySchema); // now we can populate on both sides Post.find().populate('categories').exec(function(err, posts) { /* ... */ }); Category.find().populate('posts').exec(function(err, categories) { /* ... */ });