Let's suppose I have a schema like this
var Language = new Schema({
name: { type: String, unique: true, required: true },
pos: [{
name: String,
attributes: [{
name: String
}]
}]
});
Will each item in pos, and in attributes, have an _id? If I add a unique index to the name field in the pos array, will uniqueness be enforced to just that array, or will it be unique for all entries?