Hello, I'd like to find a way to share an open connection with two separate instances of mongoose. Here's an example.
var mongoose = require('mongoose');
mongoose.connect('foo/bar');
var instance1 = new mongoose.Mongoose();
var instance2 = new mongoose.Mongoose();
// This is sharing the ENTIRE Mongoose.Connection object, which has all the models, logging functions, etc. What I want to share is ONLY the open mongodb client connection and nothing else.
instance1.connection = mongoose.connection;
instance2.connection = mongoose.connection;
Is it possible to do something like this? The reason for wanting to do this is to have a separate mongoose instance for each request processed by a server, so that all queries\logs generated by that request can be meta tagged with a specific request context different from all other requests.