Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could fflib_QueryFactory now allow multiple nested subselects? #494

Open
phil-apexology opened this issue Aug 21, 2024 · 4 comments
Open
Assignees

Comments

@phil-apexology
Copy link

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?

@dmitrii-dronov
Copy link

Agree, this is much-needed

@alexander-smeliov
Copy link

I think this is a good idea

@igor-voitovetchi
Copy link

It seems to be very useful feature

@ImJohnMDaniel
Copy link
Contributor

We agree. Work on this enhancement will begin soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants