Hi!
I am wondering does mongoose always create *_id* for sub-documents
(documents in array of parent document) even if sub-document is not added
as *Schema* object, rather as pure JSON object.
Example:
// please notice that email object is not Schema, it is normal JSON.
var email = {
address : { type : String }
}
var User = mongoose.Schema({
name : { type : String},
lastname : { type : String},
emails : [email]
})
I know that if I create email sub-document also with Schema that each email
in array will have *_id*, but even if I create it without Schema (like in
example above) mongoose still create *_id* for each email in array.
So does mongoose always create *_id* for objects in array and is there any
way to say mongoose not to create it.
Thanks.
--
You received this message because you are subscribed to the Google Groups
"mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/d/optout.