Hibernate version:
Hibernate 3 under EJB3
All I want is to know if this is possible using the EJB3 over hibernate 3 and Jboss 4.0.4 GA.
I have a parent class
abstract class A{
Integer id;
attr A;
attr B;
}
class B extends A{
string aName;
attr C;
attr D;
}
I want to make aName in class B a part of the primary Key so the primary key in b will be (id -> pk,fk, aName,pk) I must enforce that no aName is repeated and I must index this field (so the field can't be nullable)
I ruled out the Single Table strategy. As I'm using POSTGRE SQL and it supports SQL UNION I really don't care if the strategy is JOINED or TABLE_PER_CLASS).
Please tell me if there is a way I can do this.
|