3 Replies Latest reply on Mar 30, 2006 1:33 PM by liudan2005

    Inheritance TABLE_PER_CLASS not supported?

    liudan2005

      I have following 3 entities:

      
      @Entity
      @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
      public class Pet implements Serializable
      {
      
       private Long id;
      
       @Id @GeneratedValue
       public Long getId()
       {
       return id;
       }
      
       public void setId(Long a_id)
       {
       id = a_id;
       }
      }
      
      
      @Entity
      public class Cat extends Pet
      {
      ...
      }
      
      @Entity
      public class Dog extends Pet
      {
      
      }
      


      When I deploy to jboss, it gives me error message:
      Cannot use identity column key generation with <union-subclass> mapping for: com.xxx.Cat

      Changing it to SINGLE_TABLE would solove the problem. Is TABLE_PER_CLASS supported by jboss?