title: Jackson complains when deserializing a collection of polymorphic objects
body: <p>I've got the following hierarchy:</p>
  
  <pre><code>@Entity
  @Table(name = "...")
  @JsonIgnoreProperties(ignoreUnknown = true)
  @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type", visible = true, defaultImpl = A.class)
  @JsonSubTypes({ @JsonSubTypes.Type(value = B.class, name = "B") })
  public abstract class Base implements IJPAEntity&lt;String&gt;, Jsonable {
  /*
     implementation
  */
  }
  
  
  @Entity
  @Table(name = "...")
  public class A extends Base {
  /*
     implementation
  */
  }
  
  
  @Entity
  @Table(name = "...")
  public class B extends Base {
  /*
     implementation
  */
  }
  </code></pre>
  
  <p>Whenever I do the following deserialization everything is fine:</p>
  
  <pre><code>String testJSON = "{\"id\": \"someId\",\"description\": \"someDescription\",\"type\": \"B\"}";
  Base b = new ObjectMapper().readValue(testJSON, Base.class);
  </code></pre>
  
  <p>Jackson successfully deserializes the JSON string to a <strong>B</strong> object and assigns a reference of type <strong>Base</strong>.</p>
  
  <p>But the moment that I try to do the same kind of deserialization, but for a collection, I get an exception:</p>
  
  <pre><code>String testJSON = "[{\"id\": \"someId\",\"description\": \"someDescription\",\"type\": \"B\"}, {\"id\": \"anotherId\",\"description\": \"anotherDescription\",\"type\": \"B\"}]";
  List&lt;Base&gt; list = new ObjectMapper().readValue(testJSON, new TypeReference&lt;List&lt;Base&gt;&gt;(){});
  </code></pre>
  
  <blockquote>
    <p>org.springframework.cloud.cloudfoundry.com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of com.mycomp...Base, problem: abstract types either need to be mapped to concrete types, have custom deserializer, or be instantiated with additional type information</p>
  </blockquote>
  
  <p>In other words, the moment I try to deserialize a JSON array containing different types of objects into a container of base type Jackson throws an exception.</p>
  
  <p>I tried tweaking a lot of things, but nothings seems to fix it.</p>
  
  <p>Any ideas will be greatly appreciated!</p>