From 98b45ce4b27757d7953b0cf42ea341db6f85f429 Mon Sep 17 00:00:00 2001 From: Piotr Gajek Date: Wed, 8 May 2024 15:04:17 +0200 Subject: [PATCH] 119 complex queries cause error on line 1905 column 1 systemqueryexception invalid bind expression type of date for column of type string (#121) * SubQueries Binding Fix Signed-off-by: Piotr PG Gajek * Code Improvement Signed-off-by: Piotr PG Gajek --------- Signed-off-by: Piotr PG Gajek --- force-app/main/default/classes/SOQL.cls | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/force-app/main/default/classes/SOQL.cls b/force-app/main/default/classes/SOQL.cls index babe597..351a501 100644 --- a/force-app/main/default/classes/SOQL.cls +++ b/force-app/main/default/classes/SOQL.cls @@ -707,7 +707,8 @@ public virtual inherited sharing class SOQL implements Queryable { } public override String toString() { - return builder.resetBinding().toString(); + binder = new Binder(); // clear binding before query build + return builder.toString(); } public Object toValueOf(SObjectField fieldToExtract) { @@ -877,11 +878,6 @@ public virtual inherited sharing class SOQL implements Queryable { } } - public QueryBuilder resetBinding() { - binder = new Binder(); - return this; - } - public override String toString() { String query = '';