-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Mapping joined subclass with composite foreign key
PostPosted: Mon Mar 14, 2005 6:21 am 
Newbie

Joined: Thu Mar 10, 2005 9:49 am
Posts: 3
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>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.