You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Mongoose is a [MongoDB](https://www.mongodb.org/) object modeling tool designed
13
13
14
14
The official documentation website is [mongoosejs.com](http://mongoosejs.com/).
15
15
16
-
Mongoose 7.0.0 was released on February 27, 2023. You can find more details on [backwards breaking changes in 7.0.0 on our docs site](https://mongoosejs.com/docs/migrating_to_7.html).
16
+
Mongoose 8.0.0 was released on October 31, 2023. You can find more details on [backwards breaking changes in 8.0.0 on our docs site](https://mongoosejs.com/docs/migrating_to_8.html).
<imgsrc="https://pbs.twimg.com/profile_images/819400302864412676/6x2g2XtJ_400x400.jpg"alt="Building a Production Ready Node.js JSON API"style="width: 140px" />
<imgsrc="https://developer.mozilla.org/mdn-social-share.cd6c4a5a.png"style="width: 140px"alt="Express Tutorial Part 3: Using a Database (with Mongoose)">
Copy file name to clipboardExpand all lines: docs/migrating_to_8.md
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,12 @@
6
6
}
7
7
</style>
8
8
9
-
There are several backwards-breaking changes
10
-
you should be aware of when migrating from Mongoose 7.x to Mongoose 8.x.
9
+
There are several backwards-breaking changes you should be aware of when migrating from Mongoose 7.x to Mongoose 8.x.
11
10
12
11
If you're still on Mongoose 6.x or earlier, please read the [Mongoose 6.x to 7.x migration guide](migrating_to_7.html) and upgrade to Mongoose 7.x first before upgrading to Mongoose 8.
13
12
13
+
We also recommend reviewing the [MongoDB Node.js driver's release notes for v6.0.0](https://github.com/mongodb/node-mongodb-native/releases/tag/v6.0.0) before upgrading to Mongoose 8.
14
+
14
15
*[Removed `rawResult` option for `findOneAndUpdate()`](#removed-rawresult-option-for-findoneandupdate)
15
16
*[`Document.prototype.deleteOne()` now returns a query](#document-prototype-deleteone-now-returns-a-query)
Mongoose 8 uses [v6.x of the MongoDB Node driver](https://github.com/mongodb/node-mongodb-native/blob/main/HISTORY.md#600-2023-08-28).
69
+
Mongoose 8 uses [v6.x of the MongoDB Node driver](https://github.com/mongodb/node-mongodb-native/releases/tag/v6.0.0).
69
70
There's a few noteable changes in MongoDB Node driver v6 that affect Mongoose:
70
71
71
72
1. The `ObjectId` constructor no longer accepts strings of length 12. In Mongoose 7, `new mongoose.Types.ObjectId('12charstring')` was perfectly valid. In Mongoose 8, `new mongoose.Types.ObjectId('12charstring')` throws an error.
0 commit comments