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.
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: