-->
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 with Inheritance and extended Primary Key ?
PostPosted: Sun Jul 12, 2009 9:57 am 
Beginner
Beginner

Joined: Sun Jul 12, 2009 9:53 am
Posts: 21
Hi all,

I'm completely stuck...

I have two classes A and B. A has a composite primary key consisting of p1 and p2 and additional attributes p3 and p4.
B extends A, introduces two additional attributes p5 and p6, which p5 should also be an additional key.

Because B extends A, at least the fields p3 and p4 will not have to be included in the table for B because they are already in its superclasses table (which can be found via the foreign key (p1,p2).

If I now want to saveOrUpdate B, i want the corresponding A-fields (in the A-table) also to be updated.

But how will I have to map this in the hbm ?

An example could be:

You have objects containing data and a second table that contains the text in multiple languages for the objects.


Br, Markus


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.