-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Labels
Description
this query
Set<Id> reportIds = new Map<Id, Misconduct_Report3__c>(miscReports).keySet();
Nebula.Query allegQuery = new Nebula.Query(Schema.Allegation__c.SObjectType)
.addFields(new List<SObjectField>{Schema.Allegation__c.Misconduct_Report__c, Schema.Allegation__c.Allegation_Type__c, Schema.Allegation__c.CreatedDate})
.includeRelatedRecords(Schema.Allegation_Review3__c.Allegation__c, reviewQuery)
.filterWhere(Schema.Allegation__c.Misconduct_Report__c.Id, Nebula.SOQL.Operator.IS_IN, reportIds);
the filterWhere method is generating the following where clause in my query
FROM Allegation__c
WHERE Id IN {a8NOC00000000BO2AY, a8NOC00000000BT2AY, a8NOC00000000BY2AY, a8NOC00000000Bd2AI, a8NOC00000000Bi2AI, a8NOC00000000Bn2AI, a8NOC00000000Bs2AI, a8NOC00000000Bx2AI, a8NOC00000000C22AI}
which is resulting in the System.QueryException expecting a colon, found '{'
I've traced this back to the SOQL.QueryArgument.formatObjectForQueryString() method not calling the convertSetToQueryString() method for a Set argument, but instead falling through to the terminal else clause, which just serializes the Set, resulting in the value we have above.