-->
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 question on a join table with more than 2 jointures
PostPosted: Wed Aug 09, 2006 3:18 am 
Newbie

Joined: Wed Aug 09, 2006 3:01 am
Posts: 2
Hello everybody

I'm new on hibernate and I'm facing a problem of mapping on a many-to-many relation with 5 join on.

I'll explain myself :
I've got a table t_actor, t_idea et t_ideastate.
An idea can be at severals states and each of this state is caused by severals actors. Moreover each state has a date.

For example :
Idea 1 has been in 2 states : "proposed" the 06/02/02 and "realized" the 06/03/02. It has been "proposed" by Actor1 and Actor2 and has been realized by Actor2 and Actor3.

This informations are held by a join table called is_in_a_state containing Ids of idea, Ids of Actors, Ids of IdeaState and date (it has more fields but the relation of the other Ids are the same as the Actors' one.

I want my objects Actors can get Ideas in a Set and for each Ideas can retrieve a Set of state with the set of actors linked to the state.

My problem is that I have no idea how to map this.
I guess I will have to use the composite-element thing but the documentation isn't really clear on this point.

I join a screenshot of my database structure.

Image

Thanks for help !

PS : Excuse my english, I haven't used it since time :)





Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:



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.