Hi,
Is there any way where we can have joined subclass with a different primary key than the super class.
Eg:
Person Table ===========
Id -PK (ORACLE SEQ) fname - VARCHAR lname - VARCHAR
Customer Table =========== Id - PK (ORACLE_SEQ) prop1 - VARCHAR prop2 - VARCHAR personId - FK - Person(Id)
Having this kind of table structure, if we have to go with java classes like Person, and Customer extending Person the mapping strategy to be used is joined-subclass I suppose. But the subclass Customer's table has a different primary key to that of Person' table. Joined subclass doesn't seem to have any Id element to handle these kind of cases.
Is there any way to get around with this problem ?? We cant change the table structure since its a legacy system.
Any help is appreciated.
Cheers!! Katta
|