-->
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: Mapping of joining table to another joining table
PostPosted: Tue Jan 06, 2009 3:12 am 
Newbie

Joined: Sun Jan 04, 2009 10:44 am
Posts: 1
Hibernate version:3.2.6

I'm a newbie in hibernate but i know the basic mapping like one-to-many and many-to-many. However, i was stuck on a certain scenario and I've been trying to solve this. I searched through the internet but unfortunately couldn't find any solution.

Given the ERD below, user has a discriminator column where M is manager and D is developer. Manager table (which is the user) has many-to-many relationship with Developer table (which is also user).

In addition, the manager has many task hence the joining table manager_tasks. Also, manager can assign task to his developers.

How do i map developer_task from developer such that when i add tasks for a developer it would insert primary keys? I'm using many-to-many mapping hence i don't have concrete classes for manager_developers and manager_tasks.

Thanks in advance for your help.

Image


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.