Skip to content
New issue

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

docs: fix a wrong example in v6 migration guide #14758

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
docs: fix a wrong example in v6 migration guide
fixes a wrong example with `typePojoToMixed` behavior in mongoose 5
  • Loading branch information
abdelrahman-elkady committed Jul 23, 2024
commit b48801b276db71cad17eb9f9f6177b25413c9dba
2 changes: 1 addition & 1 deletion docs/migrating_to_6.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ Schema paths declared with `type: { name: String }` become single nested subdocs

```javascript
// In Mongoose 6, the below makes `foo` into a subdocument with a `name` property.
// In Mongoose 5, the below would make `foo` a `Mixed` type, _unless_ you set `typePojoToMixed: true`.
// In Mongoose 5, the below would make `foo` a `Mixed` type, _unless_ you set `typePojoToMixed: false`.
const schema = new Schema({
foo: { type: { name: String } }
});
Expand Down