-->
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: Extra column on join table
PostPosted: Fri Jun 19, 2009 12:38 am 
Newbie

Joined: Wed Jun 22, 2005 6:33 pm
Posts: 8
Let's say I've got tables People and Meals. I could join them with table PeopleMeals, that shows what meals people like to eat. A standard many-to-many mapping would work great.

But now, pretend I want to keep track of a person's favorite meal. I could add a column to PeopleMeals called IsFavorite.

Is there a way to access this extra column without creating a PeopleMeals class and doing two one-to-many associations. This seems a little complex for such a simple instance:

People <--> PeopleMeals <--> Meals

Thanks!

Norman


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.