pow-mongodb-fixtures icon indicating copy to clipboard operation
pow-mongodb-fixtures copied to clipboard

Clear function problem

Open polizinha opened this issue 9 years ago • 3 comments

Hello! I'm trying to use clear function and I haven't success. Debugging, I saw that when at line 150 (results.db.collectionNames(function(err, names)), my object result doesn't have collectionNames function and I haven't code progress.

My results object: { db: { domain: { domain: null, _events: [Object], _maxListeners: 10, members: [] }, _events: {}, _maxListeners: 10, s: { databaseName: 'pwtests', topology: [Object], options: [Object], logger: [Object], bson: {}, authSource: undefined, readPreference: undefined, bufferMaxEntries: -1, parentDb: null, pkFactory: undefined, nativeParser: undefined }, serverConfig: [Getter], bufferMaxEntries: [Getter], databaseName: [Getter], options: [Getter], native_parser: [Getter], slaveOk: [Getter], writeConcern: [Getter] } }

polizinha avatar May 05 '15 19:05 polizinha

Same issue here!

pipo02mix avatar Jun 19 '15 08:06 pipo02mix

It is related to the version of mongodb package. If you install as dependency of this module mongodb@1.3.20 then all works.

The reason is that newer version of mongo changed the API of the driver, but this module did not update consequently.

A fix should be required, and it should be to get collection names according to newer methods of the driver.

bitliner avatar Aug 07 '15 20:08 bitliner

clear function without the data argument still does not seem to drop the database when using the mongodb driver (version 2.0.34) that is packaged with this module.

poperor avatar Sep 11 '15 13:09 poperor