You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When addPolymorphicFields(SObjectField, Map<SObjectType, List<SObjectField>>) or addPolymorphicFields(SObjectField, Map<SObjectType, List<SOQL.QueryField>>) is used with a non-empty map, but with empty list as one of the values, the resulting query literally queries no fields for that SObject type (notice the double space after THEN):
SELECT Id, Subject, TYPEOF Who WHEN Contact THEN ELSE Alias, Email, (...) END FROM Task
Please consider throwing a runtime exception for an empty list or, arguably better, adding Id as the default field if none are specified:
SELECT Id, Subject, TYPEOF Who WHEN Contact THEN Id ELSE Alias, Email, (...) END FROM Task
The text was updated successfully, but these errors were encountered:
When
addPolymorphicFields(SObjectField, Map<SObjectType, List<SObjectField>>)
oraddPolymorphicFields(SObjectField, Map<SObjectType, List<SOQL.QueryField>>)
is used with a non-empty map, but with empty list as one of the values, the resulting query literally queries no fields for that SObject type (notice the double space afterTHEN
):Please consider throwing a runtime exception for an empty list or, arguably better, adding
Id
as the default field if none are specified:The text was updated successfully, but these errors were encountered: