title: How to specify UUID in mongo $where clause
body: <p>I have an object that was stored via mongo-java-driver. Object uses <code>java.util.UUID</code> for its <code>_id</code> field. Following is presentation of object via mongo shell:</p>
  
  <pre><code>&gt; db.b.find()
  { "_id" : BinData(3,"zUOYY2AE8WZqigtb/Tqztw==") }
  </code></pre>
  
  <p>I have a requirement to process searching via <code>$where</code> clause. I use following code to do it:</p>
  
  <pre><code>Mongo m = new Mongo();
  DBCollection coll = m.getDB("a").getCollection("b");
  coll.save(new BasicDBObject("_id", UUID.randomUUID()));
  // ??? - don't know what should be specified
  DBObject query = new BasicDBObject("$where", "this[\"_id\"] == " + ???);
  coll.find(query).count()
  </code></pre>
  
  <p>The question is what should I specify instead of <code>???</code> to make it work?</p>
  
  <p>Thanks for any help.</p>