(node:42970) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
at NativeCollection. [as ensureIndex] (/project/node_modules/casbin-mongoose-adapter/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:244:33)
at NativeCollection.create (/project/node_modules/casbin-mongoose-adapter/node_modules/mongoose/lib/model.js:1753:33)
Here is a list of libraries that I'm using:
casbin: "^5.11.5",
casbin-mongoose-adapter: "^3.1.1",
mongoose: "^6.0.12",
Please, can it be upgraded to work with a newer version of mongoose/mongo?
As far as I understand, string ensureIndex should be replaced by createIndexes in lib/model.js
Hi,
I'm getting following warning:
Here is a list of libraries that I'm using:
Please, can it be upgraded to work with a newer version of mongoose/mongo?
As far as I understand, string
ensureIndex
should be replaced bycreateIndexes
inlib/model.js
Thanks, Wojciech