|
Well i have: @Entity() @Table(name = "A") @Inheritance(strategy = InheritanceType.JOINED) @DiscriminatorColumn(name = "INTH_TYPE") abstract class A { int id; int status; }
------------------------------- @Entity @Table(name = "B") abstract class B extends A{ }
--------------------------------- @Entity @Table(name = "C") class C extends B { } ------------------------------------
In table C i inserted Records .. They have "INTH_TYPE" = C. C_Dao.persist(C_Object); Now i want to get them from DB using B_Dao implementation passing as entityClass Class B .. B_Dao.findByStatus ; It throws exception Object with id: X was not of the specified subclass: B (Discriminator: null) Can you explain me why it happens? on EclipseLink it works.. an here we have JPA 2.0 standard
|