I have the following class:
@Entity
public class exemplo extends Model {
@Id
private Integer id_nome;
private String Designacao_PT;
private String Nota_PT;
public exemplo(Integer id_nome,String Designacao_PT,String Nota_PT){
this.id_nome= id_nome;
this.Designacao_PT = Designacao_PT;
this.Nota_PT = Nota_PT;
}
}
In this way the primary key is 'id_name'. If I want to put the Designation_PT as a foreign key how can I do it?
I've seen something about @joinColumn but I still have not figured it out. I'm programming in IntelliJ 14.0.2