title: MongoDB UpdateFirst Method Usage
body: <p>I am using MongoTemplate's UpdateFirst() to update the inner document. But the update operation is failing. </p>
  
  <p>my Mongo Collection Structure:</p>
  
  <pre><code>{
  "_id" : ObjectId("540dfaf9615a9bd62695b2ed"),
  "_class" : "com.springpoc.model.Awards",
  "brand" : [ 
      {
          "name" : "Brand1",
          "descr" : "Desc1"
      }
  ],
  "name" : "Award1",
  "narname" : "Nar1"
  </code></pre>
  
  <p>}</p>
  
  <p>Java Code:</p>
  
  <pre><code>mongoTemplate.updateFirst(
  query(where("name").is("Award1")), 
  Update.update("brand.$.descr", "Desc2"),
  Awards.class);  
  </code></pre>
  
  <p>Award Class Structure</p>
  
  <pre><code>public class Awards {
  
  private String id;
  List&lt;Brand&gt; brand = new ArrayList&lt;Brand&gt;();
  private String name;
  private String narname;
  </code></pre>
  
  <p>Brand Class Structure</p>
  
  <pre><code>public class Brand {
  private String name;
  private String descr;
  </code></pre>
  
  <p>Any suggestions on how to update the document "Brand.Name" to new value.</p>