fflib-apex-common
fflib-apex-common copied to clipboard
Could fflib_QueryFactory now allow multiple nested subselects?
trafficstars
The method
private fflib_QueryFactory setSubselectQuery(Schema.ChildRelationship relationship, Boolean assertIsAccessible) has a check that prevents a subselect being added to a subselect - e.g.
if (this.relationship != null){
throw new InvalidSubqueryRelationshipException('Invalid call to subselectQuery. You may not add a subselect query to a subselect query.');
}
Given we can now have upto 5 levels - e.g. https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_5level_SOQLqueries.htm&release=250&type=5, would it be as simple as removing this check? Or at least enhancing this check to prevent more than 5 levels?