Hibernate version: 2.1.8
Hi,
I'm trying to define a mapping for the following case. I've got an existing class "BaseClass", which maps to a table "BASE". It's got a composite primary key, consisting of fields "FIELD_BASE_1" and "FIELD_BASE_2".
Now, I want to create SubClass (as a subclass of BaseClass). The thing is that I want it to map to a table SUB, but I don't want to give it the same composite primary key as BASE. Instead, I just want to give it a simple auto-incrementing key, and maintain the relationship with BASE as a composite foreign key.
Has anyone managed to accomplish this using Hibernate ? If so, could you please send me your mapping file ?
Thanks a lot !
Joeri
_________________ Joeri Leemans
Solution Engineer
ACA IT-Solutions - http://www.aca-it.be
<j.leemans@aca-it.be>
|