Fix like search for custom fields

This commit is contained in:
Eike Kettner 2021-03-01 20:54:35 +01:00
parent 489581d90b
commit 168f5a1a98

View File

@ -232,7 +232,7 @@ object ItemQueryGenerator {
def itemsWithCustomField(coll: Ident, field: String, op: QOp, value: String): Select = {
val cf = RCustomField.as("cf")
val cfv = RCustomFieldValue.as("cfv")
val v = if (op == QOp.LowerLike) value.toLowerCase else value
val v = if (op == QOp.LowerLike) QueryWildcard.lower(value) else value
Select(
select(cfv.itemId),
from(cfv).innerJoin(cf, cf.id === cfv.field),