title: Mongoose – linking objects to each other without duplicating
body: <p>I have a model "Category". Collection <code>categories</code> contains several objects.
  I also a have model "Post". Collection <code>posts</code> may contain a lot of objects with users' posts. "Post" object may relate to 1+ categories. How to link "Post" object to 1+ "Category"-objects without placing "Post"-object inside "Category"-object as subdocument? Certainly, I need to have an option to find all posts related to certain category.</p>
  
  <p>One of the ways I can imagine is to store in "Post"-object obj_id of all categories which it's related to. Smth like this:</p>
  
  <pre><code>var postSchema = mongoose.Schema({
    title: String,
    description: String,
    category: [ObjectId],
    created_time: Number,
  })
  </code></pre>
  
  <p>and add category later...</p>
  
  <pre><code>post.category.push(obj_id);
  </code></pre>
  
  <p>but is it <strong>really</strong> a mongoose-way? Which way is correct? Thanks.</p>
  
  <p>P.S. I've also read about population methods in mongoose docs, may it be useful in my case? Still not completely clear for me what is this.</p>