-
-
Notifications
You must be signed in to change notification settings - Fork 96
Closed
Labels
Description
So there is an issue with _id being created on embedded documents / objects.
Consider the following document:
{
_id: "foobar",
emails: [{address: "foo@example.com}]
}
Will be introspected with: _id:
However after applying: UsersComposition.getFieldOTC('emails').removeField('_id');
It's gone. What's up here?
And example of the schema:
const UsersSchema = new Schema(
{
_id: { type: String }
emails: [
{
address: {type: String, index: true},
verified: Boolean
},
],
{ strict: false, versionKey: false, autoIndex: false }
);

