Perhaps this question has been asked before, however I was unable to find an answer in the forum.
The problem is the following:
I have a class that says the folowing
Code:
public class User {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "ID")
private Integer id;
@ManyToMany
List<Users> friends;
@ManyToMany
List<Users> friendsRequests;
...
How do I specify that the friends are saved in the FRIENDS table, and the friendsRequests are saved in the FRIENDSREQUESTS table?
Given the current code, hibernate creates USERS_USERS table which does not distinguish the FRIENDS from the FRIENDSREQUESTS....
Thanks in advance...
Vasko