I need map at JPA something like this:
How I can map two relationships between two "tables", one of them is primary key and one to one (newClient in advance) and in the other side, a one to many that aint PK?
I tried something like this but it fails.
public class Recommendation implements Serializable {
@Id @OneToOne
@Column(name="...")
private Client newClient;
@ManyToOne
@Column(name="...")
private Client oldFella;
@Column(name="...")
private Boolean wasUsedToGenerateBond;
...
}
Thanks!