title: Spring Data Mongo Custom Repository Query with ObjectID
body: <p>I have a mongo query I want to implement as a Spring Mongo Repository</p>
  
  <pre><code>db.collection.find({ 'items': 
      { $elemMatch: { 
          'refund.$id' :  ObjectId('5638cab2e4b07ff212618d7e') 
          } 
      }
  }) 
  </code></pre>
  
  <p>My Repository interface is</p>
  
  <pre><code>@Query("{ 'items': { $elemMatch: { 'refund.$id' :  ObjectId(?0) } } }")
  RMA findRMAByItemRefund(String refundId);
  </code></pre>
  
  <p>It throws JSONParseException</p>
  
  <pre><code>Caused by: com.mongodb.util.JSONParseException: 
  { 'items': { $elemMatch: { 'refund.$id' :  ObjectId("_param_0") } } }
                                         ^
      at com.mongodb.util.JSONParser.parse(JSON.java:216)
  </code></pre>