I am trying to write a property to mimic this SQL:
select * from chds_personnel where personnel_id in
(
select delegatee from delegation where personnel_id = 96242
)
The code I wrote is :
Dim retVal As ChdsPersonnelCollection = New ChdsPersonnelCollection
Dim filter As PredicateExpression = New PredicateExpression()
filter.Add(New FieldCompareSetPredicate(ChdsPersonnelFields.PersonnelId, Nothing, _
DelegationFields.Delegatee, Nothing, _
SetOperator.In, _
(DelegationFields.PersonnelId = 96242)))
retVal.GetMulti(filter)
Return retVal
However, as soon as the GetMulti statement executes, I get an exception ("Object reference not set to an instance of an object")
The trace of the code (using Diagnostic switches) looks like this:
Method Enter: DaoBase.PerformGetMultiAction
Method Enter: CreatePagingSelectDQ
Method Enter: CreateSelectDQ
Method Enter: CreateSelectDQ
Method Enter: CreateSubQuery
Method Enter: CreateSelectDQ
Method Enter: CreateSelectDQ
Please help
Arvinder Chopra