title: Jackson can't read field declared in super class
body: <p>I have this parent class: </p>
  
  <pre><code>@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType")
  @JsonSubTypes(
      {
          @JsonSubTypes.Type(value = Child.class, name = "child"),
      }
  )
  public class Parent {
      @JsonProperty("objectType")
      private ProductType productType
  
      public ProductType getProductType { return productType; }
  }
  </code></pre>
  
  <p>This class is extended by a child class: </p>
  
  <pre><code>public class Child extends Parent {
      @JsonProperty("field1")
      private Field1 field1;
      @JsonProperty("field2")
      private Field2 field2;
  }
  </code></pre>
  
  <p>I try to parse the following Json file representing a serialized instance of <code>Child</code> class: </p>
  
  <pre><code>{
      "objectType" : "child1",
      "field1" : "value1",
      "field2" : "value2"
  }
  </code></pre>
  
  <p>... with the following code: </p>
  
  <pre><code>ObjectMapper objectMapper = new ObjectMapper();
  objectMapper.enableDefaultTyping();
  Parent parent = objectMapper.treeToValue(parentJsonNode, Parent.class);
  </code></pre>
  
  <p>(p.s. <code>parentJsonNode</code> is a <code>JsonNode</code> created by reading a JSON file).</p>
  
  <p>What happens is that the <code>field1</code> and <code>field2</code> of my object are correctly read and set, however the field <code>objectType</code> (declared into the parent class) remains <code>null</code> after parsing. </p>
  
  <p>What should I do to make Jackson read the value <code>child</code> of <code>objectType</code> correctly from the Json object?</p>
  
  <p>Here is the code for the <code>ProductType</code>: </p>
  
  <pre><code>@JsonFormat(shape = JsonFormat.Shape.OBJECT)
  public enum ProductType {
  
      CHILD1("child1"), CHILD2("child2");
  
      private String objectType;
  
      private ProductType(String objectType) {
          this.objectType = objectType;
      }
  
      @JsonValue
      public String getObjectType() {  return objectType; }
  
  }
  </code></pre>