Quantcast
Channel: Mongoose Sorting - Stack Overflow
Browsing all 3 articles
Browse latest View live

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 Article



Answer by kaxi1993 for Mongoose Sorting

`createdAt : {type: Date, default : new Date()}` Type Date not string man

View Article

Mongoose 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
Browsing all 3 articles
Browse latest View live




Latest Images