title: How to specify Multiple conditions in Java Mongo
body: <p>I have a code which requires me to get user details from a mongo database collection</p>
  
  <p>Following is one of the field in my Users collection </p>
  
  <pre><code>"emailSettings" : {
      "flag1" : true,
      "flag2" : true,
      "flag3" : true,
  },
  </code></pre>
  
  <p>I'm parsing the Mongo collection from my java program using the <code>BasicDB</code> object and I would want to get all the entries which satisfy the <code>emailSettings.flag1 =true</code> and <code>emailSettings.flag2 = true</code>. </p>
  
  <p>When I use <code>BasicDBObject</code> to do this, I'm able to get entries satisfying only one of the conditions.</p>
  
  <p>Is there a solution for this ?</p>