-->
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: manyToMany mappings with multiple fields
PostPosted: Mon Aug 31, 2009 12:45 pm 
Newbie

Joined: Wed Jun 24, 2009 11:34 am
Posts: 13
I have a complex type that I wanted to talk through on the forum before I figured it all out.
I have a course, material, and menumapping. Fields in menumapping table are as follows:
id
materialID
courseID
parent
Basically, I need a group of root menu items to be made from Materials depending upon the course selected, then each of those materials maps out other sub menu items from other materials. So a material has a list of other materials (which also must all comply to the courseID given). This pattern continues until there are no more materials with parent items attached to them.
So for instance, if we were checking courseID 2 - it would find the root elements, and then map out more materials based on their parent. I got this mapping to work when I had it on OneToMany relationship with just a Material and Course classes, but then it was tied to one course (because the Material class only had a field for one Course and one Parent ) I need there to be many materials mapped to many different courses?
I found this:
http://tadtech.blogspot.com/2007/09/hib ... in_03.html
which is close to what I need, but it does not seem to build out items to the same item - like Materials to Materials which is my case. Any help is appreciated.


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.