Refactor of getChildIdsById and getGrandParentIdById of fflib_SObject2
The methods are no longer depended on the domain method getRelatedFieldByDomainType, which could only relate a relationship with a single field. This change will allow to build the map with the correct fields when there are multiple relationships to the related SObjectType. for example if an SObject has two relations to Account; BillingAccountId and AccountId, then we can now specify in the method parameters which relationship should be taken. Signed-off-by: WimVelzeboer <william@velzeboer.nl>
This commit is contained in:
@@ -29,6 +29,10 @@
|
||||
*/
|
||||
public interface fflib_ISObjects2 extends fflib_ISObjects
|
||||
{
|
||||
Map<Id, Set<Id>> getChildIdsById(Map<Schema.SObjectField, fflib_SObjects2> domainsByRelationshipField);
|
||||
Map<Id, Id> getParentIdById(Map<Schema.SObjectField, fflib_SObjects2> domainsByRelationshipField);
|
||||
|
||||
// DEPRECATED METHODS
|
||||
Map<Id, Id> getGrandParentIdById(List<fflib_ISObjects2> relatedDomains);
|
||||
Map<Id, Set<Id>> getChildIdsById(List<fflib_SObjects2> relatedDomains);
|
||||
}
|
||||
Reference in New Issue
Block a user