Hello, I have the following Client, Vendor and Financial entities in my system. All of them have a list of Contacts, as would a two-way relationship in these ways.
public class Client {
@OneToMany
private List<Contact> contacts
}
public class Supplier {
@OneToMany
private List<Contatc> contacts
}
public class Financial {
@OneToMany
private List<Contat> contacts
}
public class Contact {
@ManyToOne
?????????
}
I'm using Hibernate as ORM and SpringMVC. Thanks in advance.
EDIT: It would be more or less what I need, I found this example and I'll study how to use it because I did not know it, but it seems to solve the problem.