Skip to content

Commit 98b45ce

Browse files
authored
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 <[email protected]> * Code Improvement Signed-off-by: Piotr PG Gajek <[email protected]> --------- Signed-off-by: Piotr PG Gajek <[email protected]>
1 parent 06f158b commit 98b45ce

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

force-app/main/default/classes/SOQL.cls

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,8 @@ public virtual inherited sharing class SOQL implements Queryable {
707707
}
708708

709709
public override String toString() {
710-
return builder.resetBinding().toString();
710+
binder = new Binder(); // clear binding before query build
711+
return builder.toString();
711712
}
712713

713714
public Object toValueOf(SObjectField fieldToExtract) {
@@ -877,11 +878,6 @@ public virtual inherited sharing class SOQL implements Queryable {
877878
}
878879
}
879880

880-
public QueryBuilder resetBinding() {
881-
binder = new Binder();
882-
return this;
883-
}
884-
885881
public override String toString() {
886882
String query = '';
887883

0 commit comments

Comments
 (0)