I have 3 tables: Project, User and Role. Now I would like to have a table Project2User2Role with the embedded key id_project, id_user,.
I tried it using @OneToMany relations in all three entities but I think I cannot build it like that.
And I also tried to build a Project2User2Role entity class by my self but than I have to make an idclass without the @ManyToOne relations.
How could the solution look like?
The reference manual says that you can embed a relationship inside an embedded ID :
You should thus define a Project2User2Role entity with an ID of type Project2User2RoleId:
The Project2User2RoleId class would look like this :