How about. I'm having a problem I have an array in mongodb, which is supposed to store objects, but I can not add them.
Student.update(mongoose.Types.ObjectId("5bc25777d9dded06a4635430"),{$push:{sanctions:{reason:'test'}}});
It is assumed that mongoose finds the document in the database, and then it would do a push as if it were a normal javascript array. But he does not.