title: Mapping abstract class in dozer
body: <p>I have the following class structure (it actually is a VO layer with Hibernate mappings):</p>
  
  <pre><code>public abstract class abstractClassVO {
      private int id;
      private String name;
  }
  
  public class concreteClassAVO extends abstractClassVO {
      private String aAttribute;
  }
  
  public class concreteClassBVO extends abstractClassVO {
      private Long bAttribute;
  }
  </code></pre>
  
  <p>And the equivalent DTO objects:</p>
  
  <pre><code>public abstract class abstractClassDTO {
      private int id;
      private String name;
  }
  
  public class concreteClassADTO extends abstractClassDTO {
      private String aAttribute;
  }
  
  public class concreteClassBDTO extends abstractClassDTO {
      private Long bAttribute;
  }
  </code></pre>
  
  <p>Then I have another object like this:</p>
  
  <pre><code>public class compositeObject {
       private int anAttribute;
       private abstractClassVO myInstance;
  
  }
  </code></pre>
  
  <p>and its equivalent:</p>
  
  <pre><code>public class compositeObjectDTO{
      private int anAttribute;
      private abstractClassDTO myInstance;
  }
  </code></pre>
  
  <p>How can I tell dozer to automatically map <code>myInstance</code> to the specific DTO that corresponds to the concrete class implementation in the VO layer?</p>
  
  <p>Currently, out of the box, Dozer isn't even putting anything in the <code>myInstance</code> field of the <code>compositeObjectDTO</code> class. My guess is that it's due to the fact that <code>abstractClassDTO</code> it is an abstact class, and since it cannot determine the implementation, it does nothing. I am not getting any exceptions.</p>