如何在没有架构的情况下保存文件mongoose

时间:2015-03-23 02:38:17

标签: mongoose

我有一个对象:游戏。

    game = { 
    gameId: "916304e8-c2ee-4d54-8ef1-8a5d75c7ba90", 
    gameName: "What Kind Of Person Are You Really?",
    score: 10
    }
      var thingSchema = new Schema({
gameId: String, gameName: String
}, { strict: false });
      var Thing= mongoose.model('Thing', thingSchema );
      var thing = new Thing(game);
      thing.save()

但分数未保存到数据库!

0 个答案:

没有答案