-->
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.  [ 2 posts ] 
Author Message
 Post subject: How to map in one class 2 collections of the same ITEM class
PostPosted: Fri Aug 01, 2008 5:48 am 
Newbie

Joined: Tue Mar 11, 2008 3:39 am
Posts: 8
Hello!

How to map in one main class (Person) 2 collections of the same ITEM class (PersonTransaction)?

Person
-> NewTransactions
- one1
- two1
-> OldTransactions
- one2
- two2

I need to put in 'item' table two foreign keys? How to do that?

Chris


Top
 Profile  
 
 Post subject: One to many with join table
PostPosted: Fri Aug 01, 2008 9:37 am 
Newbie

Joined: Thu Jul 31, 2008 6:28 pm
Posts: 2
Looks to me like you should use a one to many association with a join table. This kind of association is documented in the reference manual at 7.3.1 To apply it to your situation just create a second set or list with a different name and table.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

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.