【发布时间】:2017-10-18 09:09:46
【问题描述】:
var schema = new Schema({
firstName: {type: String, required: true},
lastName: {type: String, required: true},
password: {type: String, required: true},
email: {type: String, required: true, unique: true},
polls: [{type: Schema.Types.ObjectId, ref: 'Poll'}]
/*This is incorrect*/votes: [{{type: Schema.Types.ObjectId, ref: 'Poll'},{type: number}}]
});
【问题讨论】:
-
如果网站提到您的问题可以使用更多正文,那么请阅读How to Ask,了解如何在该正文中添加有意义的内容,而不是滥用标记并将您的标题简单地复制到您的问题中。
-
@CodeCaster 好吧,我不知道还有什么要说的:/ 这只是一个语法问题。