title: MongoDB - Spring data - How to ignore the property name of a Map?
body: <p>We're using MongoDB with Spring data and we would like to have below structure for a certain collection:</p>
  
  <pre><code>{
  "_id" : ObjectId("533e525bbd40c5da7cd8c3f0"),
  "_class" : "net.someClass.SomeClass",
  "source_id" : "other_id",
  "name" : {
      "NL" : "iets",
      "FR" : "quelque chose"
      }
  }
  </code></pre>
  
  <p>But due to the fact that our "name" is a custom class "TranslatableString" which contains an attribute TreeMap, mongoDB is representing a level in between:</p>
  
  <pre><code>{
  "_id" : ObjectId("533e525bbd40c5da7cd8c3f0"),
  "_class" : "net.someClass.SomeClass",
  "source_id" : "other_id",
  "name" : {
      "translations" : {
          "NL" : "iets",
          "FR" : "quelque chose"
          }
      }
  }
  </code></pre>
  
  <p>Class TranslatableString:</p>
  
  <pre><code>public class TranslatableString {
  
  @NotNull
  @Size(min = 1)
  private TreeMap&lt;LanguageEnum, String&gt; translations = new TreeMap&lt;&gt;();
  
  public TranslatableString() {
      // empty default constructor
  .............
  }
  </code></pre>
  
  <p>Is there a possibility to ignore this property by using a Spring data annotation?
  I know the existence of @Transient but this is ignoring the complete "name" attribute and it's content..</p>
  
  <p>Thanks for helping!</p>