title: Hibernate: Used mappedBy on class that extends another class annotated as JoinedSubclass?
body: <p>The following doesn't work:</p>
  
  <pre><code>@Entity
  class Owner {
  
    @OneToMany(mappedBy="owner", cascade = {CascadeType.ALL})
    protected Set&lt;B&gt; getBSet() {
      ..
    }
  
  }
  
  @Entity
  @Inheritance(strategy=InheritanceType.JOINED)
  class A {
     @ManyToOne
     public Owner getOwner() {
       ...
     }
  }
  
  @Entity
  class B extends A {
  
  }
  </code></pre>
  
  <p>It causes an exception as such: 
  org.hibernate.AnnotationException: mappedBy reference an unknown target entity property: B.user in Owner.</p>
  
  <p>I am trying to avoid copying the "owner" property into class B (which will consequently "denormalize" and copy the owner key into both tables generated for entity A and B). Also, I would really like to have A and B in a separate table and not have to use a discriminator by using SingleTable inheritance.</p>
  
  <p>Also, I can't figure out how to do something similar by using @OneToOne between A and B (and not having B extend A).</p>