given that you have tables A and B that have a Many-to-Many relationship implemented using table C, where Table C has some fields related to the relationship (for example start_date, due_date whatever).
How can you access fields of the association table.
I know that we need to use the ManyToMany with mappedBy and JoinColumn but in class A i will have a Set<B> and in B I will Set<A>, where does C come and how can I access those fields that are related to the association (such as start_date).
Here is an example to explain my questions: let's say there is entity FOLDER that has a many to many relationship with GROUP. I could do the design as follows:
Where and How can I represent INFO? Is the following a better design (of courseDUMMY entity won't be named DUMMY!)? Personally I want to go for the first design but I don't know how to represent INFO field. In that case I define Folder and Group entities as follows: In Folder folder
Again how to access INFO column located in folder_group table?
Your help is greatly appreciated. [ October 28, 2008: Message edited by: Musab Al-Rawi ]
I thought about that, but if that's the only solution (I don't know if it is or not that's why I am asking Ranchers) then probably ManyToMany works association table consists of PK of Entity tables (in other words not complete solution).