saintedlama / mongoose-version

Mongoose plugin to save document data versions. Documents are saved to a "versioned" document collection before saving original documents and kept for later use.
BSD 2-Clause "Simplified" License
144 stars 35 forks source link

Allow multiple db connections #18

Closed relvao closed 9 years ago

relvao commented 9 years ago

As it is this module is relying in mongoose.connection being the default connection. We can listen to the 'init' event and use whatever connection was used by the Model where this plugin is running.

relvao commented 9 years ago

I have created two folders, depending on the way connection are defined. I don't think it will make any difference in terms of testing and we should stay only with the ones where the connection is provided (multiple-db-connections), as they should work in both connection types.

relvao commented 9 years ago

Any chance this will be reviewed any time soon?