title: Interfaces with hibernate annotations
body: <p>i am wondering how i would be able to annotate an interface</p>
  
  <pre><code>@Entity
  @Table(name = "FOLDER_TABLE")
  public class Folder implements Serializable, Hierarchy {
  
     @Id
     @GeneratedValue(strategy = GenerationType.AUTO)
     @Column(name = "folder_id", updatable = false, nullable = false)
     private int fId;
  
     @Column(name = "folder_name")
     private String folderName;
  
     @OneToMany(cascade = CascadeType.ALL)
     @JoinTable(name = "FOLDER_JOIN_FILE_INFORMATION_TABLE", joinColumns = 
  { @JoinColumn(name = "folder_id") }, inverseJoinColumns = 
  { @JoinColumn(name = "file_information_id") })
      private List&lt; Hierarchy &gt; fileInformation = new ArrayList&lt; Hierarchy &gt;();
  }
  </code></pre>
  
  <p>above and below are 2 classes that implement an interface called Hierarchy, the folder class has a list of Hierarchyies being a folder or a fileinformation class</p>
  
  <pre><code>@Entity
  @Table(name = "FILE_INFORMATION_TABLE")
  public class FileInformation implements Serializable, Hierarchy {
  
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "file_information_id", updatable = false, nullable = false)
    private int ieId;
    @Column (name = "location")
    private String location;
  }
  </code></pre>
  
  <p>I have searched the web for someway to annotate or a workaround but I cannot map the interface which is simply this</p>
  
  <pre><code>public interface Hierarchy {
  
  }
  </code></pre>
  
  <p>I get a mapping exception on the List of hierarchies with a folder but I don't know how to 
  map the class correctly.</p>