var Embedded = new Schema({ some: String }) var Main = new Schema({ other: String, em: [Embedded] })
On Main.save ({other: 1, em: [{some: 2}]}) mongoose adds an object {other: 1, em: [{some: 2, "_ id": ObjectId ("51f6d89a6269170000000039")}] } to the database.
Can I tell mongoose not to add _id to the inline document?
source share