Sails.js & MongoDB: duplicate key error index
问题 I'm using Sails.js (0.9.8) and MongoDB (via the sails-mongo adaptor) to create a collection of pages that can be positioned in a tree-view. I would like to store the path of a page in an array of UUIDs My model: module.exports = { schema: true, attributes: { uuid: { type: 'string', unique: true, required: true, uuidv4: true }, name: { type: 'string', required: true, empty: false }, path: { type: 'array', required: true, array: true } } } It works well when I save a 'root' page (the 'path'