-->
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: Special one-to-many association
PostPosted: Thu Sep 14, 2006 10:25 am 
Newbie

Joined: Thu Sep 14, 2006 10:04 am
Posts: 2
Hello everyone.

I have a special problem to solve. I have a relationship like this in my database:

Code:
____________________                 _______________
|     table one      |               |   table two   |
|--------------------|               |---------------|
|*id                 |               |*id_version    |
|foreign key         |1-------------*|id             |
|____________________|               |_______________|



(* means Primary Key)


I should have a set of table two-datas with the id specified in the field foreign key of table one. The problem is that none of the two fields connectet to each other is a primary key.
The root of this probem is the versionated data in table two. Actually this connection whould be a simple one-to-one but if there is more than one valid result, i get a set of data.
I had a look in the documentation but I couldn't find the mapping for this. If someone has a idea how to solve this, please let me know.

PS: Sorry for my bad English ;)


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.