title: JPA entity with a interface attribute, is it possible?
body: <p>I have the following entity:</p>
  
  <pre><code>@Entity
  public class TestCaseStep implements JPAEntity&lt;Integer&gt; {
  
          ...
  
      @Column(name="STEP_NUMBER")
      private Integer stepNumber;
  
      @Enumerated(EnumType.STRING)
      @Column(name="ACTION")
      private Action action;
  
      **@ManyToOne
      @JoinColumn(name="connector")
      private ScriptItem connector;**
  </code></pre>
  
  <p>My attribute ScriptItem is a interface for 3 other classes. Is it possible to configure JPA to set the correct class id in runtime execution?</p>
  
  <p>Other resources:</p>
  
  <pre><code>public interface ScriptItem {
  
      String getValue();
      ScriptItemType getType();
  }
  
  @Entity
  @Table(name="DAT_FEED_XML")
  public class FeedXml implements JPAEntity&lt;Integer&gt;, ScriptItem {
      ...
  }
  
  @Entity
  @Table(name="DAT_DB_STMT")
  public class DbStatement implements JPAEntity&lt;Integer&gt;, ScriptItem {
         ...
  }
  </code></pre>
  
  <p>Which annotations should I use to let JPA understand that I want to save the id of one of the 3 classes?</p>
  
  <p>Thanks in advance,</p>