title: Mongoose share model schema for multiple database
body: <p>I am trying to implement multi-tenant in my application.Every tenant will be having a separate database. I have planned to change/switch the mongoose database connection dynamically for each client based on the sub-domain name using <a href="https://github.com/Automattic/mongoose/wiki/3.7-%28unstable%29-Release-Notes#connection-pool-sharing" rel="nofollow"><code>mongoose.useDb</code></a> method. Do i need to recompile mongoose model schema when every db is change/switched using <code>useDb</code>?. And is there any alternative way to accomplish this task by sharing the schema across multiple db connections .Any help will be really appreciated.Thanks in advance.   </p>