Hello Bertyno, you have two options:
If you only need to have 3 speakers and only 3 you could mappe it as
Code:
@Column(name = "ID_SPEAKER1")
...
@Column(name = "ID_SPEAKER2")
...
@Column(name = "ID_SPEAKER3")
...
or if you gonna have more than 3 speaker you should go to a OneToMany Approach
Code:
@OneToMany(mappedBy = "conference")
private java.util.List<Speaker> speakers = new java.util.ArrayList<Speaker>();
and the Speaker:
Code:
@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "conferenceId")
private Conference conference;
Regards,