title: java - MapStruct unable to map fields in base class in mapper function
body: <p>I have a Base dto and a dto which extends it</p>
  
  <pre><code>public abstract class AbstractItem {
      private String upc;
      private String quantity;
  
      //getter and setter for upc and quantity
  }
  
  public class OrderedItem extends AbstractItem {
      private String orderId;
  
      // getter and setter for orderId
  }
  </code></pre>
  
  <p>Then I have a modal which I want to convert from OrderedItem. This modal extends a base modal</p>
  
  <pre><code>public abstract class AbstractModal {
      private String qty;
  
      public void setQty(String qty) {
          this.qty = qty;
      }
      public String getQty() {
          return qty;
      }
  }
  
  public class ItemModal extends AbstractModal {
      private String orderNbr;
      private String upcNbr;
  
      // getter and setter for orderNbr and upcNbr;
  }
  </code></pre>
  
  <p>this is my mapper function using Mapstruct </p>
  
  <pre><code>@Mapper
  public interface DtoMapper {
  
      @Mappings({
          @Mapping(source = "orderedItem.orderId" target = "orderNbr"),
          @Mapping(source = "orderedItem.upc" target = "upcNbr"),
          @Mapping(source = "orderedItem.quantity" target = "qty")
      })
      ItemModal convert(OrderedItem orderedItem);
  }
  </code></pre>
  
  <p>During compilation I get an error <code>Unknown property "qty" in result type test.modal.ItemModal.</code></p>
  
  <p>Does Mapstruct support mapping fields of base class?
  If yes, can you please tell me what is wrong with my code?
  I am using java 8 and mapstruct 1.2.0</p>
  
  <p>Edit: added getter and setter for <code>qty</code> in <code>AbstractModal</code></p>