-->
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: many to many with additional data on the join table
PostPosted: Thu Feb 02, 2006 3:07 am 
Newbie

Joined: Thu Feb 02, 2006 2:42 am
Posts: 8
I have a many to many association using a join table, and the join table has some additional information.

In one case that additional info is a flag. Class A is many to many with class B, plus there is a flag. Like this:

Table A
A_ID

Table B
B_ID

Table A2B
A_ID
B_ID
FLAG

When I query to get all the object B in A that are flagged I can just use the column, but how do I properly represent the flag in the model so I can set it?

I have a similar scenario where I want to store a date on the join table (the date the association is created in this case).

(I'm using Hibernate3)


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.