I have a scenario like this. I have a class called PaymentItem, it contains two PAs:
One is PaymentItemPayeeLink class which link payment item to payee.
The other one is PaymentItemSourceLink which link payment item to Source.
The issue is when I display payment item on the screen, the payee property of paymentItem can be resolved(i.e. displayed) on the screen. However, the PaymentSource property can't be resolved. Then I discovered that this was caused
by not including PaymentItemSourceLink in my linq query to retrieve the payment items related to the payee. The below is code snippet.
public virtual List FindItemsAwaitingPayment(IPayee payee)
var payeeType = payee.GetType().ToString().Split('.').Last().Split('_').First();
//search for all payment items linked to payee
var paymentItemPayeeLinks = Container.Instances();
var paymentItems = Container.Instances();
var paymentItemSourceLinks = Container.Instances();
var itemsAwaitingPayment = from paymentItem in paymentItems
join paymentItemPayeeLink in paymentItemPayeeLinks on paymentItem.Id equals
join p in paymentItemSourceLinks on paymentItem.Id equals p.Owner.Id
paymentItem.Payment == null
&& paymentItemPayeeLink.AssociatedRoleObjectId == payee.Id
However this time, it returned 0 item which should not be. Then i check the values in paymentItemSourceLinks variable. It contains 3 items which
is correct because there are three records in the table like below. However two of them contains incorrect value for Owner property, the values are null. But the owner(i.e. PaymentItem) value should not be null. I wonder if you have come across the same