title: How to map generic collections with Spring Data(MongoDB)?
body: <p>I have some problems with mapping my inner collection.
  Items can have different content types. Here is my Item class: </p>
  
  <pre><code>@Document(collection = "items")
  public class Item{
  @Id
  private ObjectId id;   
  private List&lt;? super Content&gt; content;
  ...
  }
  </code></pre>
  
  <p>Content is a base class for different content for this Item. </p>
  
  <pre><code>public class YoutubeVideo implements Content{
       private String url;
  }
  
  public class Image implements Content{
       private String location;
  }
  ...
  </code></pre>
  
  <p>After saving (saving finishing with no problems) Item with one Image and two YoutubeVideo classes in content collection i getting this JSON</p>
  
  <pre><code>{ "_id" : { "$oid" : "4e423dcf7f3a0d12265da46c"} 
  "content" : [ 
  { "location" : "hdd path"} , { "url" : "url path"} , { "url" : "url path"}
  ]}
  </code></pre>
  
  <p>It is not this JSON I expected to see. And understandable why it is not possible to load and deserialize this document.</p>
  
  <pre><code>java.lang.RuntimeException: Can not map ? super trngl.mongo.domain.content.Content
  </code></pre>
  
  <p>How you would map this kind of object? I do not want to serialize and deserialize objects manualy. Is it possible?</p>
  
  <p>Found interestion converters class: <a href="http://static.springsource.org/spring-data/data-document/docs/1.0.0.M3/reference/html/#mapping-explicit-converters" rel="nofollow">mapping-explicit-converters</a></p>