标签: 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在哪一个是对象,哪一个是数组
User : [user] or user