duyluonglc / lucid-mongo

Mongodb ODM for adonis framework
327 stars 60 forks source link

useUnifiedTopology on lucid-mongo #241

Open mhbarros opened 4 years ago

mhbarros commented 4 years ago

In a future version of mongoose, we'll need to pass the option useUnifiedTopology: true on connection with database, but it seems that lucid-mongo is not accepting it right now, since its ignored ( see image below )

image

am i passing the option in the wrong place, or isn't actually supported?

ghost commented 3 years ago

hi, if still needed, there is a"hidden" parameter (undocumented) to use called connectionOptions. This can be found in lucid-mongo/src/Database/index.js row 122

So for instance you could do something like this: image

Best regards, Florian