Hi, (Using Adapter V2.5/VB/SQL Server 2005/WinForm)
I maintain user roles in a grid via 2 related tables (UserRole & Role):
UserRole
UserID
RoleID (FK related to Role table)
Role
RoleID
RoleName
RoleDescription
The grid is sourced from the following, but my prefetchPath filter isn't working.
Function GetRoleNames(ByVal UserID As String) As EntityCollection
Dim roleNames As New EntityCollection(New RoleEntityFactory())
Dim filter As IPredicateExpression = New PredicateExpression
filter.Add(UserRoleFields.UserID = UserID)
Dim prefetchPath As IPrefetchPath2 = New PrefetchPath2(CInt(EntityType.RoleEntity))
prefetchPath.Add(RoleEntity.PrefetchPathUserRole, Nothing, filter)
Dim adapter As New DataAccessAdapter()
Try
adapter.FetchEntityCollection(roleNames, Nothing)
Return roleNames
<snip>
What am I missing?
Thanks