Hello Fellow classmates,
I have the following code to retrieve students with associated SubjectAreaTchrStud and GroupStudent collections:
Public Shared Function GetStudentsByStudentIds(ByVal studentIds() As String) As EntityCollection
GetStudentsByStudentIds = New EntityCollection(New StudentEntityFactory)
Dim Filter As IRelationPredicateBucket = New RelationPredicateBucket
Filter.PredicateExpression.Add(PredicateFactory.CompareRange( MedfordSchoolDistrict.Elementary.GradeBook.LLBL.StudentFieldIndex.StudentId, studentIds))
Dim PrefetchPath As IPrefetchPath2 = New PrefetchPath2(CType(EntityType.StudentEntity, Integer))
PrefetchPath.Add(StudentEntity.PrefetchPathSubjectAreaTchrStud)
PrefetchPath.Add(StudentEntity.PrefetchPathGroupStudent)
_Adapter.FetchEntityCollection(GetStudentsByStudentIds, Filter, Nothing, Nothing, PrefetchPath)
Return GetStudentsByStudentIds
End Function
It works fine.
Now, the GroupStudent records change in the database.
I want to be able to refetch just the GroupStudent data for every student in my Student collection.
How would I go about doing this?
Thanks,
Fishy