-->
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: Ternary association
PostPosted: Wed Nov 12, 2003 2:03 pm 
Beginner
Beginner

Joined: Tue Oct 07, 2003 4:32 pm
Posts: 36
Location: S
I have a problem to understand about ternary association .

I have 3 tables in my db :

Code:

tb_Person
    idPerson numeric(10) not null  //Pk
    dsPerson varchar2(30)
    ....

tb_Groups
    idGroup  numeric(10) not null   /Pk
    dsGroup  varchar2(3)
    ...

and I need a relation table between tb_Person and tb_Groups :

tb_PersonGroup
    idPerson        // Fk - tb_Person
    idGroup        //  Fk - tb_Group

ie, One Person might has many Groups

 


The hibernate plugin to Middlegen


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 12, 2003 3:01 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
This should not be mapped as a ternary association but as a simple many-to-many association. tb_personGroup is just your association table, and then no PersonGroup object will be generated.

_________________
Emmanuel


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.