mongoose - model.update not working

I'm doing a simple update when my node.js app receives a certain POST request. This is my code:

app.post('/comment', function (req,res) {
    var params = req.body;
    BlogPost.update({"title": params.title}, {$push: { comments: {author : params.author, content: params.content, date: new Date().toUTCString()}}});
    res.redirect('back');
});

where BlogPost is a mongoose Model. (This model works when querying for documents).

Now the problem is, when I do subsequent queries, nothing happens. For example, running the above code for a document with "title" "aaa" (which is supposed to push an object to the array "comments", querying for that document with title "aaa" returns something like

{ _id: 51954d4663aa986aa93a734f,
  title: 'aaa',

  comments: [] }

Anything I'm doing really wrong?

You should add a callback to get the error message. I was having a similar issue and simply adding the callback, everything was working fine, even with an empty callback.

Try:

app.post('/comment', function (req,res) {
var params = req.body;
BlogPost.update({"title": params.title}, {$push: { comments: {author : params.author, content: params.content, date: new Date().toUTCString()}}},function(error){console.log(error);});
res.redirect('back');
});