title: How to persist a Inheritance relation with repeated column
body: <p>I Have this code with inheritance Relation: </p>
  
  <pre><code>@Entity
  @Table(name = "PERSON")
  @Inheritance(strategy = InheritanceType.JOINED)
  @DiscriminatorColumn(name = "PERSON_TYPE", discriminatorType = DiscriminatorType.STRING, length = 4)
  
  public abstract class Person implements Serializable {
  
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name="ID_PERSON_ID")
  private Long id;
  
  ...other attributes
  }
  
  @Entity
  @Table(name="STUDENT")
  @DiscriminatorValue(value = "STUD")
  public class Student extends Person implements Serializable{
  
  @OneToMany(targetEntity = ListingRatings.class, mappedBy = "student", cascade=CascadeType.ALL, orphanRemoval=true)
  private List&lt;ListingRatings&gt; listingRatings;
  
  ...other attributes
  
  }
  
  @Entity
  @Table(name="LISTING_RATING")
  public class ListingRatings implements Serializable{
  
  @Id
  @GeneratedValue(strategy=GenerationType.IDENTITY)
  @Column(name="ID_LISTING_RATING_ID")
  private Long id;
  
  @ManyToOne(targetEntity = Teacher .class, optional = false )
  @JoinColumn(name = "ID_PERSON_ID", referencedColumnName = "ID_PERSON_ID",                      insertable=true , updatable=true )
  private Teacher teacher;
  
  @ManyToOne(targetEntity = Student.class, optional = false )
  @JoinColumn(name = "ID_PERSON_ID", referencedColumnName = "ID_PERSON_ID")
  private Student student;
  
  ...other attributes
  }
  
  @Entity
  @Table(name="TEACHER")
  @DiscriminatorValue(value="TEAC")
  public class Teacher extends Person implements Serializable{
  
  @OneToMany(targetEntity = ListingRatings .class, mappedBy = "teacher",    fetch=FetchType.EAGER)
  private List&lt;ListingRatings&gt; listingRatings ;
  
  }
  </code></pre>
  
  <p>When i try to persist this relation, I have this Exception</p>
  
  <p>Caused by: org.hibernate.MappingException: Repeated column in mapping for entity:
  cl.programarte.gym.model.ListingRatings
  column: ID_PERSON_ID (should be mapped with insert="false" update="false")</p>
  
  <p>I do not know if this is possible. 
  Changing, insertable = true, updatable = true to insertable = false, updatable = false, everything works fine. 
  However I need to persist the id of teacher, but this does not. </p>
  
  <p>Maybe is possible to make a composite key for this case? 
  It is recommended for you? </p>
  
  <p>Thank you very much.</p>