-->
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 scalar components - couldn't find an example
PostPosted: Sat Jul 22, 2006 2:14 am 
Newbie

Joined: Sat Jul 22, 2006 1:59 am
Posts: 3
Hibernate version:3.1.2

I have one class, a bridge club, whose information is spread over several tables, all of which share a key. There is exactly 1 record in each of these tables corresponding to one club.

One of these tables, which I consider as main, has a club code as a primary key. Other tables containing club info refer to this as a foreign key and they don't have their own primary keys. The reason why I split information on the same object into several tables is that I don't need all of it at the same time.

Because other tables depend on the main table, I thought the proper way to treat this situation is to treat info in other tables as components of the main table. However, the examples that I tried and worked are:

1) component info residing in the SAME table (from the reference manual)
2) component collections (also from the reference manual)

I could not find any examples with one-to-one component mapping, where components reside in other tables, which is what I have here. Needless to say, I tried various things, but I just can't get it right.

Any advice would be greatly appreciated.

Regards,
Milan


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.