title: Node js - Push() Function Not working Correctly with reference and mongodb
body: <p>I am using ObjectReferences and push the comment data to the database but it's not working Even the data is being saved but only 'id' get added, not the user and comment</p>
  
  <p><strong>Main File with Push Method</strong> </p>
  
  <pre><code>var Comment = require('./models/comments'),
      Camp = require('./models/user');    
  app.post('/camp/:id/comment', (req,res)=&gt;{
  Camp.findById(req.params.id, (err, idf)=&gt;{
      if(err){
      console.log(err);
      }else{
  
      Comment.create(req.body.comment, (err, commentz)=&gt;{
      if(err){
        console.log(err);
      }else{
        console.log(commentz + idf);
        idf.comments.push(commentz)
        idf.save();
        res.redirect('/camp/'+ idf._id)
      }
      })
      }
  })
  })
  </code></pre>
  
  <p><strong>ObjectReferences user.js</strong></p>
  
  <pre><code>    var mongoose = require('mongoose');
  
  var schema = mongoose.Schema;
  var blogSchema = new schema({
  name : String,
  email  : String,
  descr : String,  // TEMPORERY
  posts: [
  {
  type: mongoose.Schema.Types.ObjectId,
  ref: 'Post'
  
  }
  ],
  comments: [
      {
      type: mongoose.Schema.Types.ObjectId,
      ref: 'Comment'
      }
  ]
  });
  
  var Camp = mongoose.model("Camp", blogSchema);
  module.exports= Camp;
  </code></pre>
  
  <p><strong>CommentSchema comments.js</strong></p>
  
  <pre><code>    var mongoose = require('mongoose');
  
  var schema = mongoose.Schema;
  var cSchema = new schema({
  user : String,
  comment  : String,
  })
  
  var Comment = mongoose.model("Comment", cSchema);
  module.exports =Comment;
  </code></pre>
  
  <p><strong>Main Form</strong></p>
  
  <pre><code>    &lt;form action="/camp/&lt;%=camp._id%&gt;/comment" method="post" class="form-group"&gt;
  &lt;div class="form-group"&gt;
  &lt;input class="form-control" type="text" name="comment[user]" value="" placeholder="Name"&gt;
  &lt;/div&gt;
  &lt;div class="form-group"&gt;
      &lt;textarea class="form-control" style="height:100px" type="text" name="comment[comment]" value="" placeholder="Your Comment"&gt;&lt;/textarea&gt;
  &lt;/div&gt;
  &lt;div class="form-group"&gt;
  &lt;button class="btn btn-primary btn-large btn-block" type="submit" name="submit"&gt; SUBMIT&lt;/button&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The only ID added to the user's database, not all comments and in the comment, collection data added perfectly</p>