1
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;
}
}
This way the primary key is 'id_name'. If I want to put Designacao_pt as a foreign key how can I do?
I’ve seen something about @joinColumn but I haven’t quite figured it out yet. I’m programming on Intellij 14.0.2