feat(mongodb): mongodb3.5+ is unstable and error on $pushAll, meanTorrent can used on mongodb 3.5 3.6

#44
This commit is contained in:
OldHawk
2017-12-15 09:17:41 +08:00
parent 19d31a36b6
commit 7eda0d271d
14 changed files with 25 additions and 25 deletions

View File

@@ -36,16 +36,16 @@ var ArticleSchema = new Schema({
type: String,
default: 'def'
}
});
}, {usePushEach: true});
ArticleSchema.statics.seed = seed;
mongoose.model('Article', ArticleSchema);
/**
* Seeds the User collection with document (Article)
* and provided options.
*/
* Seeds the User collection with document (Article)
* and provided options.
*/
function seed(doc, options) {
var Article = mongoose.model('Article');
@@ -71,7 +71,7 @@ function seed(doc, options) {
User
.findOne({
roles: { $in: ['admin'] }
roles: {$in: ['admin']}
})
.exec(function (err, admin) {
if (err) {