We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In both of the ways of specifying an embedded object below, the field in the parent of the embedded object does not appear in the Model Schema:
Schema = require('mongoose').Schema case1 = new Schema( { field1: String field2: String } ) case2 = { field3: String field4: String } root = { case1: case1 case2: case2 } object = new Schema(root, {strict: false})
Resulting Model Schema is missing case1 and doesn't show case2 the way I would expect.
{ "case2.field3": "string", "case2.field4": "string", "_id": "string" }
Expected:
{ "case1": {"field1": "string", "field2": "string"} "case2": {"field3": "string", "field4": "string"} "_id": "string" }
Note, that if the field is an array, it does show up correctly:
{ "case3": [{"field5": "string", "field6": "string"}] }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In both of the ways of specifying an embedded object below, the field in the parent of the embedded object does not appear in the Model Schema:
Resulting Model Schema is missing case1 and doesn't show case2 the way I would expect.
Expected:
Note, that if the field is an array, it does show up correctly:
The text was updated successfully, but these errors were encountered: