title: Spring Mongo Template not saving the list of custom objects to MongoDb
body: <p>I am using spring Mongo Template to persist data to MongoDb. I have a custom object which has a list.</p>
  
  <pre><code>Public Class CustomObject implements Serializable{
         private CustomType1 header; 
         private List&lt;CustomType2&gt; Values; 
  }
  </code></pre>
  
  <p>I created a wrapper class in order to wrap my custom object and the wrapper class looks like this</p>
  
  <pre><code>public Class Wrapper { 
         private String id;
         private Object object; 
  }
  </code></pre>
  
  <p>I am calling the save method like below</p>
  
  <pre><code>Wrapper wrapper = new wrapper(key, value); 
  mongoTemplate.save(wrapper, collectionName);
  </code></pre>
  
  <p><strong>I am able to save the CustomObject to MongoDB but when I check the the document in the mongodb it is only showing the "header", the "values" field is getting ignored.</strong> It is not giving any error.</p>
  
  <p>Can anyone help me with this?</p>