Why does mongo do not correctly add it to your library records?

Good time of day.
Is the scheme comments:
var commentSchema = mongoose.Schema({
 text: String,
 postNum: Number,
 num: Number,
 rating: [],
 addtime: String,
 to: Number
});

So, saving the method save all the new comments,I noticed: after 12 records she starts to shove the new entry in front of all the existing ones.
c00cc3ef97c64e7e8364ee1633112814.png
(green - OK))) red - I've got something wrong)
------------------------------------------------------
Don't know if this helps, but usually retain, like so:
Comment.count({}, function (err, count) {
 var newComment = new Comment;
 newComment.text = comment;
 newComment.authorId = authorId;
 newComment.num = count + 1;
 newComment.postNum = postNum;
 newComment.save(function (err) {
 if(err) throw err;
.....
});
September 19th 19 at 00:03
2 answers
September 19th 19 at 00:05
Solution
Do not create indexes on the fields? when you create, you can specify the sort of storage, do not know whether it affects the sample without the use of this field. And so I advise you not to focus on the order of insertion, and to use a common tool "sort" to specify exactly in which order to show.
You can still try directly through the console, to make a request if it will return correctly, the interface works well.
With the interface, all the rules, thank you. Sort helped. - damion_Jast commented on September 19th 19 at 00:08
September 19th 19 at 00:07
Solution

Find more questions by tags MongooseMongoDBDatabasesJavaScriptNode.js