title: Hibernate cannot create joined sub-class table while using annotation
body: <p>I am new to Hibernate and I cannot create joined sub-class table while using Hibernate annotation.</p>
  
  <p>Here is my code.</p>
  
  <p>This is the main class.</p>
  
  <pre><code>@Entity
  @Table(name="CRM_User")
  @Inheritance(strategy=InheritanceType.JOINED)
  public class UserImp extends BaseModel implements IUser, Serializable
  {
    ... ...
  </code></pre>
  
  <p>And Staff class extends User class.</p>
  
  <pre><code>@Entity
  @Table(name="CRM_Staff") 
  @PrimaryKeyJoinColumn(name="Id")
  public class StaffImp extends UserImp implements IStaff, Serializable
  {
    ... ...   
  </code></pre>
  
  <p>And when I run the unit test, I get the error.</p>
  
  <pre><code>/* Test get all User */
  @Test
  public void testGetAllUser()
  {
      List&lt;IUser&gt; users = (List&lt;IUser&gt;) this.userDAO.getAll("UserImp");
      assertEquals(2, users.size());
  }
  </code></pre>
  
  <p>This is the error.</p>
  
  <pre><code>......
  19:31:04,880  INFO SchemaExport:281 - schema export complete
  19:31:04,918  INFO DefaultTraversableResolver:81 - Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
  19:31:05,158  WARN JDBCExceptionReporter:233 - SQL Error: 1146, SQLState: 42S02
  19:31:05,158 ERROR JDBCExceptionReporter:234 - Table 'test.crm_staff' doesn't exist  
  ... ...
  </code></pre>
  
  <p>Thanks so much!</p>