title: Mongoose - how to find discriminators already in use
body: <p>I'm using MongoDB and Mongoose in a REST API.  Some deployments require a replica set, thus separate read/write databases, so as a result I have separate read/write connections in the API.  However, more simple deployments don't need a replica-set, and in those cases I point my read/write connections to the same MongoDB instance and database.</p>
  
  <p>My general approach is to create all models for both connections at API start up. Even when read/write conns are connecting to same database, I am able to create the same models on both connections without error.</p>
  
  <pre><code>let ReadUser = dbRead.model('User', userSchema);
  let WriteUser = dbWrite.model('User', userSchema);
  // no error even when dbRead and dbWrite point to same DB
  </code></pre>
  
  <p>Trouble comes when until I start using Mongoose Discriminators.</p>
  
  <pre><code>let ReadSpecialUser = ReadUser.discriminator('SpecialUser', specialUserSchema);
  let WriteSpecialUser = WriteUser.discriminator('SpecialUser', specialUserSchema);
  
  // Results in this Error when read and write point to same DB:
  // Error: Discriminator with name "SpecialUser" already exists 
  </code></pre>
  
  <p>I'm look for an elegant way to deal with this.  Is there a way to query the db for discriminators that are already in use?</p>