Stop Mongoose from creating _id property for sub-document array items

If you have subdocument arrays, Mongoose automatically creates ids for each one. Example: { _id: “mainId” subDocArray: [ { _id: “unwantedId”, field: “value” }, { _id: “unwantedId”, field: “value” } ] } Is there a way to tell Mongoose to not create ids for objects within an array? 7 Answers 7