File tree Expand file tree Collapse file tree 2 files changed +0
-11
lines changed Expand file tree Collapse file tree 2 files changed +0
-11
lines changed Original file line number Diff line number Diff line change 66
77let driver = null ;
88
9- const _mongooseInstances = [ ] ;
10- module . exports . _mongooseInstances = _mongooseInstances ;
11-
129module . exports . get = function ( ) {
1310 return driver ;
1411} ;
1512
1613module . exports . set = function ( v ) {
1714 driver = v ;
18-
19- for ( const mongoose of _mongooseInstances ) {
20- const Connection = driver . getConnection ( ) ;
21- mongoose . Connection = Connection ;
22- mongoose . connections = [ new Connection ( mongoose ) ] ;
23- mongoose . Collection = driver . Collection ;
24- }
2515} ;
Original file line number Diff line number Diff line change @@ -70,7 +70,6 @@ function Mongoose(options) {
7070 } , options ) ;
7171 const conn = this . createConnection ( ) ; // default connection
7272 conn . models = this . models ;
73- driver . _mongooseInstances . push ( this ) ;
7473
7574 if ( this . options . pluralization ) {
7675 this . _pluralize = legacyPluralize ;
You can’t perform that action at this time.
0 commit comments