title: Inheritance in JPA not working
body: <p>I have a parent class:</p>
  
  <pre><code>@MappedSuperclass
  public class BaseText implements Serializable {
  
      @Column(name = "LOCALE_CODE", nullable = false)
      private String localeCode;
  
      @ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
      @Index
      @Column(name = "LOCALIZED_TEXT_ID", nullable = false)
      @ForeignKey
      private LocalizedText localizedText;
  
      //getters and setters 
  }
  </code></pre>
  
  <p>And one of the sub classes:</p>
  
  <pre><code>@Entity
  @Table(name = "ASSESSMENT_TEXT")
  @AttributeOverride(name = "localeCode", column = @Column(name = "LOCALE_CODE"))
  @AssociationOverride(name = "localizedText", joinColumns = @JoinColumn(name = "LOCALIZED_TEXT_ID"))
  public class AssessmentText extends BaseText {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      @Column(name = "ID")
      private Long id;
  
      @ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
      @Index
      @Column(name = "ASSESSMENT_ID", nullable = false)
      @ForeignKey
      private Assessment assessment;
  
      //Getters and setters.
  }
  </code></pre>
  
  <p>When I am trying to persist an object I get the following error:</p>
  
  <pre><code>org.apache.openjpa.persistence.ArgumentException: Superclass field "java.lang.Object.localizedText" is mapped in the metadata for subclass "com.my.com.AssessmentText", but is not a persistent field.
  </code></pre>
  
  <p>What is causing this and how to solve it?</p>
  
  <p>I am using embedded derby database in JUnit and the JPA implementation is OpenJPA.</p>