-->
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.  [ 3 posts ] 
Author Message
 Post subject: About many to many realtionship
PostPosted: Sat Jun 26, 2010 1:20 am 
Newbie

Joined: Sat Jun 26, 2010 1:10 am
Posts: 2
hi,
I want to add extra columns to the intermediate table which is creating while we doing many to many relationship.
ex:
Student table;
id
name

Course table;
c_id;
title;
what i want to do is

student_course;
id
c_id
registered_date(this is the extra field i want to add)

How can i do it?

thank you


Top
 Profile  
 
 Post subject: Re: About many to many realtionship
PostPosted: Sat Jun 26, 2010 6:40 am 
Newbie

Joined: Mon Jun 21, 2010 1:36 pm
Posts: 14
In this case, you might need to break your Many-to-Many association into two One-to-Many associations not only at DB level but also at Object level. So, you will have to design 3 objects one for each of your table.

Take a look at the below URL:
http://stackoverflow.com/questions/1919 ... attributes


Top
 Profile  
 
 Post subject: Re: About many to many realtionship
PostPosted: Sat Jun 26, 2010 7:00 am 
Newbie

Joined: Sat Jun 26, 2010 1:10 am
Posts: 2
bjagan wrote:
In this case, you might need to break your Many-to-Many association into two One-to-Many associations not only at DB level but also at Object level. So, you will have to design 3 objects one for each of your table.

Take a look at the below URL:
http://stackoverflow.com/questions/1919 ... attributes



Ok... I got the point. thankyou very much.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.