title: JPA Inheritance demands ID in subclass
body: <p>I have a problem with my jpa domain model. I am just trying to play around with simple inheritance for which I use a simple Person base-class and and a Customer subclass. According to the official documentation (both, JPA and EclipseLink) I only need the ID-attribute/column in the base-class. <strong>But when I run my tests, I always get an error telling me that Customer has no @Id?</strong></p>
  
  <p>First I thought the problem lies in the visibility of the id-attribute, because it was private first. But even after I changed it to protected (so the subclass has direct access) it isnt working.</p>
  
  <p>Person:</p>
  
  <pre><code>@Entity @Table(name="Persons")
  @Inheritance(strategy = InheritanceType.JOINED)
  @DiscriminatorColumn(name = "TYPE")
  public class Person {
  
      @Id
      @GeneratedValue
      protected int id;
      @Column(nullable = false)
      protected String firstName;
      @Column(nullable = false)
      protected String lastName;
  </code></pre>
  
  <p>Customer:</p>
  
  <pre><code>@Entity @Table(name = "Customers")
  @DiscriminatorValue("C")
  public class Customer extends Person {
  
      //no id needed here
  </code></pre>
  
  <p>I am running out of ideas and resources to look at. It should be a rather simple problem, but I just dont see it.</p>