title: workaround for db.getCollectionNames() returning empty list for mongo clients predating Mongo 3.0
body: <p>Quoting the <a href="https://docs.mongodb.com/v3.2/reference/method/db.getCollectionNames/#considerations" rel="nofollow noreferrer">manual from <code>db.getCollectionNames()</code></a>;</p>
  
  <blockquote>
    <p>For MongoDB 3.0 deployments using the WiredTiger storage engine, if you run db.getCollectionNames() from a version of the mongo shell before 3.0 or a version of the driver prior to 3.0 compatible version, db.getCollectionNames() will return no data, even if there are existing collections. For more information, see WiredTiger and Driver Version Compatibility.</p>
  </blockquote>
  
  <p>Basically I have a large project where our mongo client is &lt;3.0 and our mongo db is now on >3.0 with wiredtiger. I have been in the process of updating our spring to accomodate this change, but finding too many things breaking. Is there another way to handle this call without upgrading any jars? </p>
  
  <p>sorry I am new to mongo so I have googled a lot but found nothing useful, other than upgrade to a new mongo client.</p>