Otis, I tried the code you posted and I get the following error message at the filter.PredicateExpression.Add line:
Unable to cast object of type 'System.String' to type 'SD.LLBLGen.Pro.ORMSupportClasses.IRelationCollection'.
Here is the full code I am using (I think your FieldCompareSetPredicate example was missing the parameter for "negate", so I added that in as False).
Public Function GetMyFamilyListByUser(ByVal pUserID As String)
Dim UserID As Guid = New Guid(pUserID)
Dim fields As New ResultsetFields(3)
fields.DefineField(PersonFields.FirstName, 0, "Name")
fields.DefineField(PersonFields.Gender, 1, "Gender")
fields.DefineField(PersonFields.BirthDate, 2, "BirthDate")
Dim ExpRight As Expression = New Expression(" ", ExOp.Add, PersonFields.LastName)
Dim ExpFull As Expression = New Expression(PersonFields.FirstName, ExOp.Add, ExpRight)
fields(0).ExpressionToApply = ExpFull
_** BTW, if there's a better way to return (FirstName + ' ' + LastName) as one field, let me know. **_
Dim filter As New RelationPredicateBucket()
filter.PredicateExpression.Add(New FieldCompareSetPredicate(PersonFields.ParentId, Nothing, PersonFields.ParentId.SetObjectAlias("P1"), Nothing, SetOperator.Equal, PersonFields.UserId = pUserID, String.Empty, False, 0, Nothing))
Dim children As New EntityCollection(New PersonEntityFactory)
Dim ResultTable As New DataTable
Using adapter As DataAccessAdapter = New DataAccessAdapter(connStr)
adapter.FetchTypedList(fields, ResultTable, filter, 0, Nothing, True, Nothing, 0, 10)
Return ResultTable
End Using
End Function