posted 15 years ago
Can I specify a where condition with @JoinColumn or is there any other annotation for this purpose?
Suppose I have User and Subjects objects, 1 to many relationship. I have 2 Sets - passedSubjects and failedSubjects based on column subjectStatus.
How can I load subjects into passedSubjects where subjectStatus="passed"
@JoinColumn(name = "userid", referencedColumnName="userid", table="UserSUBJECTs")
public Set<Subject> getPassedSubjects() {
return subjects;
}