title: What is the workaround in Hibernate to replace absent interface support?
body: <p>Let's suppose we have the following tables:</p>
  <pre><code>USER (user_id)
  USER_OWNER (own_id, user_id, type, emp_id, std_id)
  EMPLOYEE (emp_id)
  STUDENT (std_id)
  </code></pre>
  <p>So, we have a user owner that can be either an employee or a student. We have table USER_OWNER that has FK to EMPLOYEE and STUDENT to provide data integrity.</p>
  <p>As I found out neither JPA nor Hibernate supports interfaces. So, what is the best way to solve this problem without inheritance in Hibernate (I can't use inheritance as I need a generic solution for different classes that are not inherited, for example, car, book, table etc)? How to make these relations?</p>
  <p>As I understand</p>
  <pre><code>@Entity
  class User {
     
      private ?UserOwner? owner;
  }
  
  
  @Entity
  class Employee {
  ....
  }
  
  @Entity
  class Student {
  ...
  }
  </code></pre>
  <p>But what about UserOwner?</p>