Consider this example
There is a Class called Department ( Department has a Set of Sections )
Department has Sections ( Sections has Set of Students )
And Sections has Students. ( Students has properties has name)
Now I want to retrieve a Department where student has a name eg section.student.name = "Sam"
when I retrieve the Department , it should contain Sections which again should contain students with Name as "Sam"
The problem is when I retrieve Department , it retrieves all the sections , even though no student named "Sam" exist in that section.
Can anybody help me in this regard.
|