Answer by Sam for Mongoose Sorting
It will automatically create the createdAt and updatedAt var options={ timestamps: true } var Activity = mongoose.Schema({ sender_id : {type: String, required: true }, user_id : {type: String,...
View ArticleAnswer by kaxi1993 for Mongoose Sorting
`createdAt : {type: Date, default : new Date()}` Type Date not string man
View ArticleMongoose Sorting
I have a problem with displaying data with sorting. Here is my query, Activity.find({"user_id": sesUser._id}, {}, {offset: 0, limit : 5, sort:{createdAt:1}}, function (e,a){ ... }); I have data about...
View Article
More Pages to Explore .....