Skip to content

Commit 90307d8

Browse files
committed
Added a comment to explain why the ID field is hardcoded in the queryFields set
1 parent 140a4b2 commit 90307d8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/classes/QueryGenerator.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class QueryGenerator {
1818
this.sobjectResult = sobjectResult;
1919

2020
this.sobjectType = fieldSet != null ? fieldSet.getSObjectType() : sobjectResult.getSObjectType();
21-
this.queryFields = new Set<String>{'Id'};
21+
this.queryFields = new Set<String>{'Id'}; // Always add the ID field, just in case it's not in the field set
2222

2323
if(this.fieldSet == null) this.parseSObjectFields();
2424
else this.parseFieldSetMembers();

0 commit comments

Comments
 (0)