-->
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: How to map: One table, two "one-to-one" joins
PostPosted: Thu Mar 06, 2008 2:39 pm 
Beginner
Beginner

Joined: Mon Mar 07, 2005 6:23 pm
Posts: 21
Hibernate version: 3.0.5

Alright, somewhat of an odd situation here.

Let's say I've got a table, INFO. INFO has a "child" table, INFO_LOCK, which acts like a one-to-one (the PK for INFO is the PK for INFO_LOCK).

We can fake it as a one-to-one relationship in Hibernate, and this works well.

The INFO table gets too large and is then split into INFO and INFO_ARCHIVE

INFO and INFO_ARCHIVE are exactly the same structure; they just have different sets of data.

Both tables still have the same "one-to-one" association to INFO_LOCK.

How would you best represent this in Hibernate?


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.