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
|