title: Spring data MongoDB update multiple fields
body: <p>Is it possible with Spring-Data-MongoDB to update multiple fields of a document with one query.</p>
  
  <p>For example, I can run this mongo query:</p>
  
  <pre><code>db.customers.update(
    {"firstname": "Max"},
    { 
      $set: {
        "lastname": "Maier",
        "email": "p.maier@example.com"
      }
    }
  );
  </code></pre>
  
  <p>How can we achieve this with code and the spring MongoTemplate?
  For example here is the code to udpate one value:</p>
  
  <pre><code>Query select = Query.query(Criteria.where("firstname").is("Max"));
          Update updateValue = Update.update("lastname", "Maier");
          UpdateResult updateResult = mongoTemplate.updateFirst(select, updateValue, Customer.class);
  </code></pre>
  
  <p>It seems that the Update#set method accepts only one (key, value) and no multi-values or list of values.</p>