Thanks to this post, a clear explaination about how to specify a Many-to-many relation between 2 entities with a <master> and <slaves>.
When you map a same "ManyToMany relationShip" in both directions, you??For example : if you have two entities : "Event" and "User", and a??
need to tell which of these two directions is (kind of) the "master".??
So : one of your @ManyToMany annotations must have the info :??
User can "follow" several "Events",??
and an Event can be followed by several Users ("ManyToMany??
relationShip").?? You would have :?? in the entity User :??
?? ?? public Set<Event> followedEvents = new HashSet<Event>();?? in the entity Event :??
?? ?? public Set<User> followsByUsers = new HashSet<User>();??
Thanks to Dam74 !