Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sequences and multiple tables for inheritance

264787Mar 8 2005 — edited Mar 9 2005
Hi,
This thread 521986 suggests some solution to my problem but I still have problems.

I have a base class Licence, which has a couple of child classes - PremisesLicence and PersonalLicence. I have corresponding tables in my database for these classes. The licence table only holding the attributes that the parent class has and a primary key licence_id. The 'child' tables also have a primary key of licence_id and all the other necessary attributes (corresponding to the subclass).

I have set sequencing on the parent table (native oracle), mapped the licence_id in the parent table to the id in parent class. Then tried mapping PremisesLicence.id to table premiseslicence.licence_id - and also tried not mapping (as suggested in the attached forum link) the premiseslicence.id to anything. In the former instance the sequence number doesn't get generated, in the latter, I get a mapping error indicated that I must map the primary key in the premiseslicence table.

Can anyone suggest any other strategies? I can't find any tutorial or examples on mapping inherited classes to multiple tables i.e. where there are a number of new attributes that need persisting.

TIA
Conrad
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 6 2005
Added on Mar 8 2005
4 comments
441 views