title: Query embedded object with AND in mongodb
body: <p>Let's say there is:</p>
  
  <pre><code>{username : "tom1", address : { type : 0, year : 2001 }}
  {username : "tom2", address : { type : 1, year : 2011 }}
  {username : "tom3", address : { type : 0, year : 2031 }}
  {username : "tom4", address : { type : 1, year : 2002 }}
  </code></pre>
  
  <p>I'm using Java Driver, how can I query:
  users who's address.type = 1 AND address.year > 2010 ?</p>
  
  <p>Notice it is in the address object, so normal query <code>{address.type : 1, address.year : {$gt : 2010}}</code> does not work at all.</p>
  
  <p>Thank you!</p>