Skip to content

Commit 6bcdb4b

Browse files
committed
Merge pull request apex-enterprise-patterns#95 from tmowbrey/patch-4
Key assertIsAccessible based on boolean value
2 parents 7cdc713 + 930c4ff commit 6bcdb4b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fflib/src/classes/fflib_QueryFactory.cls

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,9 @@ public class fflib_QueryFactory { //No explicit sharing declaration - inherit fr
408408
}
409409

410410
fflib_QueryFactory subselectQuery = new fflib_QueryFactory(relationship);
411-
subSelectQuery.assertIsAccessible();
411+
if(assertIsAccessible){
412+
subSelectQuery.assertIsAccessible();
413+
}
412414
subselectQueryMap.put(relationship, subSelectQuery);
413415
return subSelectQuery;
414416
}
@@ -739,4 +741,4 @@ public class fflib_QueryFactory { //No explicit sharing declaration - inherit fr
739741
public class InvalidFieldSetException extends Exception{}
740742
public class NonReferenceFieldException extends Exception{}
741743
public class InvalidSubqueryRelationshipException extends Exception{}
742-
}
744+
}

0 commit comments

Comments
 (0)