Cannot sort by parent of parent etc.
Hi, I am using this great framework in my projects and have an issue with the addSortOrder method when sorting by a grandparent field, e.g.:
public IHistoryRepository getOppLineItemRepo() {
...
oppLineItemRepo.addSortOrder(new List<Schema.SObjectField>{ OpportunityLineItem.OpportunityId, Opportunity.AccountId, Account.Name }, RepositorySortOrder.ASCENDING);
return oppLineItemRepo;
}
force-app\factory\RepoFactory.cls Method does not exist or incorrect signature: void addSortOrder(List<Schema.SObjectField>, RepositorySortOrder) from the type IHistoryRepository
Same thing is happening with the IRepository (and I also guess IAggregateRepo) interfaces. I think there's a line missing in the IRepository interface:
IRepository addParentFields(List<Schema.SObjectField> relationshipFields, List<Schema.SObjectField> parentFields);
Am I correct, or is there something else I am missing?
Kind regards, Jan
@mambafieber I will have a look at this on Monday, thanks for raising this!
@mambafieber this is all set, apologies for the delay and thanks again for bringing this up!
@jamessimone excellent, looking forward to checking out the other changes too. Have a great day!
Thank you, you as well!