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
[ ] Regression
[ ] Bug report
[ ] Feature request
[x] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
I am using mongoose plugin which depends on mongoose.connection
As I wrote in some other issues (#27 and #109) there was a problems after nest upgrade from 4 to 6 because you started to use createConnection() instead of connect().
Expected behavior
To have an option to get connection before models are initialized. Would be good to have it in MongooseModule.forRoot() or MongooseModule.forRootAsync() or somewhere else
Plugin that I am using is mongoose-id-validator which was using mongoose.connection to instance a model and search for a reference that I have in Document. I had to change this plugin after upgrading nest
My question is, is there some official way of getting connection that nest establish to mongo, after it is created, but before models are generated with MongooseModule.forFeature (plugins can't be applied on models that are already initialized), because plugin that I am using got as an option to provide a connection that should be used.
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Described in Current behavior
Environment
Nest version: 6.8.5
For Tooling issues:
- Node version: XX
- Platform:
Others:
The text was updated successfully, but these errors were encountered:
I'm submitting a...
Current behavior
I am using mongoose plugin which depends on
mongoose.connection
As I wrote in some other issues (#27 and #109) there was a problems after nest upgrade from 4 to 6 because you started to use
createConnection()
instead ofconnect()
.Expected behavior
To have an option to get connection before models are initialized. Would be good to have it in
MongooseModule.forRoot()
orMongooseModule.forRootAsync()
or somewhere elsePlugin that I am using is
mongoose-id-validator
which was usingmongoose.connection
to instance a model and search for a reference that I have inDocument
. I had to change this plugin after upgrading nestMy question is, is there some official way of getting connection that nest establish to mongo, after it is created, but before models are generated with
MongooseModule.forFeature
(plugins can't be applied on models that are already initialized), because plugin that I am using got as an option to provide a connection that should be used.Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Described in
Current behavior
Environment
The text was updated successfully, but these errors were encountered: