Hello,
Obligation (Table obligations)
Obligation_Ajustment (Table obligation_adjustments)
Obligation and Obligation_Adjustments class are similar and share ID and POLICY_ID field.
I would like to get a list of entities that are not adjusted. In SQL it will looks like:
Select * from Obligation where obligation.Policy_Id is not in (Select Distinct Policy_Id) from obligation_adjustments).
I have no clue on how to do this with Aurelius.
Hereunder a pseudo code on how I'm doing this. it's not efficient and it is tacking a lot of time (50 000 records):
ObligationList := Manager.Find<TObligation>.List;
For Obligation in ObligationList do
begin
ObligationAdjustment := MAnager.Find<TobligationAdjustment>.Where(Linq['POLICY_ID] = Obligation.Policy_ID).Take(1).UniqueResult;
if not(assigned(ObligationAdjustment)) then
begin
//do all my stuff
End;
end;
Can you please help me ?