title: Hibernate Annotation using base entity
body: <p>In my project I have a POJO called BaseEntity as shown below.</p>
  
  <pre><code>class BaseEntity{
      private int id;
      public void setId(int id){
          this.id=id;
      }
      public int getId(){
          return id;
      }
  }
  </code></pre>
  
  <p>And a set of other POJO entity classes like Movie, Actor,...</p>
  
  <pre><code>class Movie extends BaseEntity{
      private String name;
      private int year;
      private int durationMins;
      //getters and setters
  }
  </code></pre>
  
  <p>I'm using BaseEntity only for using it as a place holder in some interfaces. I never have to store a BaseEntity object. I have to store only the entity objects extended from BaseEntity. How should I annotate these classes so that I get one table per entity extended from the BaseEntity. For movie it should be like (id, name, year, durationMins).</p>