I have a parent class:

```
@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 
}

```

And one of the sub classes:

```
@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.
}

```

When I am trying to persist an object I get the following error:

```
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.

```

What is causing this and how to solve it?

I am using embedded derby database in JUnit and the JPA implementation is OpenJPA.