How do you sort a many to many collection association?
Code:
public class students{
private List<Schedule> schedule;
private List<Watch> watches;
//works well, can't remember the correct syntax, but ignore syntax and take in the concept of the question. so this is a double join using a bridge table...that's where the problem really lies but I want a solution.
@JoinTable("student_schedule", @JoinColumn(name="std_std_id", referenced_Column="std_id"), inverseJoinColumn(name="sch_sch_id", referenced_column="sch_id"))}
@OnetoMany(cascade=CascadeAll)
public List<Schedule> getSchedule()
{
return schedule;
}
...
}
public class Schedule{
private Date startTime;
private String day;
...
}
public class Watch{
private String color;
}
any ideas?