我可以在Mongoose的子文档中使用唯一索引吗?

我想要防止RecordList的重复插入,其中两个RecordsList是相同的,如果它们具有相同的Record集合,即相同的子文档数组。 这是架构:

 var RecordList = new Schema({ event: {type: ObjectId, ref: Event}, creator: {type: ObjectId, ref: User}, records: { type: [Record], unique: true } }, {strict: true, safe: true}) 

但是,似乎unique: true records中的unique: true不起作用; 当我保存与数据库中现有的一个RecordSchema相同的RecordList时,重复被成功保存,但我希望它返回一个错误。

我是新来的mongoose,看了其他的SO问题,很长一段时间,mongoose的文档没有发现任何东西,据我所知。 对不起,如果这有一个明显的答案!