模型

时间:2017-10-18 19:09:38

标签: node.js mongodb mongoose mongoose-schema

无法识别Mongoose架构中对象或数组声明之间的区别

架构:

 var Schema = mongoose.Schema;
    var user = new Schema({
        _id: {type: Schema.ObjectId, ref: 'Admin'},
        name: {type: String, ref: 'Admin'}
    });

User : [user] or user在哪一个是对象,哪一个是数组

0 个答案:

没有答案