Hi all,
I have two entities which have one-to-many relationship. Lets say 'Course' and 'Student' One Course can have many number of students. Then in Course class there is a field like
private List<Student> students = new ArrayList<Student>();
I want to know that when we get a particular Course object, is it come with relevant Students objects ?
I think it should be the way this should behave. I saved data properly with these relationship, but I want to get data back. I got back a Course object, but I couldn't find any student associate with it.
I have DAO classes and they have no any wrong.
Is there any way to do this?
regards, Dil.
|