title: MongoDB in Spring push array with update first then found object null
body: <p>I'm updating a document with Spring's MongoTemplate</p>
  
  <p>This is the code for updating a document(making array push for product comment);</p>
  
  <pre><code>public void saveProductComment(String productId,ProductComment comment){
      DBObject commentDBO = new BasicDBObject();
  
      mongoTemplate.getConverter().write(comment, commentDBO);
  
      mongoTemplate.updateFirst(
              Query.query(Criteria.where("_id").is(productId)),
              new Update().push("comment", commentDBO),
              Product.class);
  }
  </code></pre>
  
  <p>Then I'm getting updated document but it returns null after the update.
  There is the code to finding all documents.</p>
  
  <pre><code>public List&lt;Product&gt; getAllProducts() {
          return mongoTemplate.findAll(Product.class, COLLECTION_NAME);
      }
  </code></pre>
  
  <p>Problem is that, when i updated the document , its storing order changes(Sorting alphabetically after update).
  For Example;</p>
  
  <pre><code>//Before Update
  {
    name: {...} , 
    price: {...} ,
    comment: {[...]}
  }
  {
    comment: {[...]},
    name: {...} ,
    price: {...} ,
  }
  </code></pre>
  
  <p>How can i achieve the document after the update. Are there any approach to finding document(s) with Spring's MongoTemplate or any alternative solution for that ? Thanks for your attention.</p>