Skip to content
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 authored 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