I have composite primary key in one of my tables in Java web app using Hibernate framework:
For example:
@Embeddable
public class Student implements Serializable {
@Column(name = "student_id")
private String studentId;
@Column(name = "course_code")
private String courseCode;
}
I can filter records by both fields. However, I want to search for a record with studentId only. How would it be possible in Hibernate?
Aucun commentaire:
Enregistrer un commentaire