This content has been marked as final.
Show 2 replies
-
1. Re: entity inheritance and migration from Preview 5 to Beta
natanasov Sep 1, 2005 8:12 AM (in response to epbernard)If I don?t include discriminator column in the primary key and I use composite primary key then JBoss doesn?t include the discriminator to the primary key. In this case I cannot have a two objects that belong to different classes with the same primary key.
This version supports this feature the problem was in the declaration of primary key class. If the discriminator column is the first field that everything is ok.
So the class must be declared@Embeddable(access = AccessType.FIELD) public class ParamCompanyObjectPK extends ObjectPK { private String tableID; private String companyID; private String paramID; ? }
-
2. Re: entity inheritance and migration from Preview 5 to Beta
epbernard Sep 1, 2005 12:23 PM (in response to epbernard)Of course an id has to be unique in a class hierarchy! Remember a Cat is essentially an animal so if I query an animal by its id, I need to get only 1 return, not too. That's why the discriminator is not part of the PK