MongoDB 服务器版本兼容性
¥MongoDB Server Version Compatibility
Mongoose 依靠 MongoDB Node.js 驱动程序 与 MongoDB 进行通信。你可以参考 此表 获取有关哪个版本的 MongoDB 驱动程序支持哪个版本的 MongoDB 的最新信息。
¥Mongoose relies on the MongoDB Node.js Driver to talk to MongoDB. You can refer to this table for up-to-date information as to which version of the MongoDB driver supports which version of MongoDB.
以下是 semver 范围,表示哪些版本的 mongoose 与列出的 MongoDB 服务器版本兼容。
¥Below are the semver ranges representing which versions of mongoose are compatible with the listed versions of MongoDB server.
MongoDB 服务器 | Mongoose |
---|---|
8.x |
^8.7.0 |
7.x |
^7.4.0 | ^8.0.0 |
6.x |
^6.5.0 | ^7.0.0 | ^8.0.0 |
5.x |
^5.13.0 | ^6.0.0 | ^7.0.0 | ^8.0.0 |
4.4.x |
^5.10.0 | ^6.0.0 | ^7.0.0 | ^8.0.0 |
4.2.x |
^5.7.0 | ^6.0.0 | ^7.0.0 | ^8.0.0 |
4.0.x |
^5.2.0 | ^6.0.0 | ^7.0.0 | ^8.0.0 |
3.6.x |
^5.0.0 | ^6.0.0 | ^7.0.0 | ^8.0.0 <8.8.0 |
3.4.x |
^4.7.3 | ^5.0.0 |
3.2.x |
^4.3.0 | ^5.0.0 |
3.0.x |
^3.8.22 | ^4.0.0 | ^5.0.0 |
2.6.x |
^3.8.8 | ^4.0.0 | ^5.0.0 |
2.4.x |
^3.8.0 | ^4.0.0 |
Mongoose ^6.5.0
也适用于 MongoDB 7.x 服务器。但并非所有 MongoDB 7.x 服务器的新功能都受 Mongoose 6.x 支持。
¥Mongoose ^6.5.0
also works with MongoDB server 7.x. But not all new MongoDB server 7.x features are supported by Mongoose 6.x.
请注意,Mongoose 5.x
放弃了对 3.0.0
之前的所有 MongoDB 版本的支持。如果你需要使用 MongoDB 2.6
或更早版本,请使用 Mongoose 4.x
。
¥Note that Mongoose 5.x
dropped support for all versions of MongoDB before 3.0.0
. If you need to use MongoDB 2.6
or older, use Mongoose 4.x
.