title: OneToMany Mapping with with Joined Inheritence Annotations:
body: <p>I have the following domain classes:</p>
  
  <pre><code>@Entity
  @Table(name="ADDRESSBOOK_FIELD")
  @Inheritance(strategy=InheritanceType.JOINED)
  public abstract class AbstractAddressbookField {
     private int dbID;
     private Addressbook addressbook;
  
     public AbstractAddressbookField() {
     }
  
     @Id
     @GeneratedValue(strategy=GenerationType.AUTO)
     public int getId() {
        return dbID;
     }
  
     public void setId(int id) {
        this.dbID = id;
     }
  
     @ManyToOne
     @JoinColumn(nullable=false)
     public Addressbook getAddressbook() {
        return addressbook;
     }
  
     public void setAddressbook(Addressbook addressbook) {
        this.addressbook = addressbook;
     }
  </code></pre>
  
  <p>}</p>
  
  <p>.</p>
  
  <pre><code>@Entity
  @Table(name="DATE_FIELD")
  public class DateField extends AbstractAddressbookField {
      public DateField() {
  
      }
  }
  </code></pre>
  
  <p>.</p>
  
  <pre><code>@Entity
  @Table(name="NEW_ADDRESSBOOK")
  public class Addressbook {
      private int dbID;
      private Set&lt;DateField&gt; dateFields = new HashSet&lt;DateField&gt;();
  
      @Id
      @GeneratedValue(strategy=GenerationType.AUTO)
      public int getDbID() {
          return dbID;
      }
  
      public void setDbID(int dbID) {
          this.dbID = dbID;
      }
  
      @OneToMany(mappedBy="Addressbook", cascade={CascadeType.ALL})
      public Set&lt;DateField&gt; getDateFields() {
          return dateFields;
      }
  
      public void setDateFields(Set&lt;DateField&gt; dateFields) {
          this.dateFields = dateFields;
      }
  }
  </code></pre>
  
  <p>My packages are being scanned correctly to pick up all the mappings, but I am getting the following exception:</p>
  
  <pre><code>Caused by: org.hibernate.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class: fields.DateField
  </code></pre>
  
  <p>I am unsure as to why this is, as the class is clearly mapped to.</p>