Associate value with isTrue/isFalse criteria operators.

We now associate a boolean value with both operators as those operators are rendered using equals comparison in the actual SQL text.

Orginal pull request #1188
This commit is contained in:
Mark Paluch
2022-02-28 15:17:44 +01:00
committed by Jens Schauder
parent c8eafe7337
commit 5352fe34cf
3 changed files with 8 additions and 4 deletions

View File

@@ -494,13 +494,15 @@ class QueryMapper {
if (comparator == Comparator.IS_TRUE) {
Expression bind = bindBoolean(column, parameterSource, true);
Expression bind = bindBoolean(column, parameterSource,
mappedValue instanceof Boolean ? (Boolean) mappedValue : true);
return column.isEqualTo(bind);
}
if (comparator == Comparator.IS_FALSE) {
Expression bind = bindBoolean(column, parameterSource, false);
Expression bind = bindBoolean(column, parameterSource,
mappedValue instanceof Boolean ? (Boolean) mappedValue : false);
return column.isEqualTo(bind);
}