Hello @Sebastian and @ClaytonMoore
I’ve carefully reviewed this thread, and I don’t understand what I’m doing wrong. None of the things mentioned above are working for me.
An example of my test schema, which has just one string field, “stringField”:
{
"previewUrls": {},
"properties": {
"validateOnPublish": false
},
"scripts": {},
"isPublished": true,
"fieldRules": [],
"fieldsInLists": [],
"fieldsInReferences": [],
"fields": [
{
"name": "stringField",
"properties": {
"isRequired": false,
"isRequiredOnPublish": false,
"isHalfWidth": false,
"fieldType": "String",
"createEnum": false,
"editor": "Input",
"inlineEditable": false,
"isEmbeddable": false,
"isUnique": false,
"contentType": "Unspecified"
},
"isLocked": false,
"isHidden": false,
"isDisabled": false,
"partitioning": "invariant"
}
],
"type": "Default"
}
Example test content:
{
"data": {
"queryTestContents": [
{
"id": "4459f5c3-92c9-4555-a4fb-56d20cca6633",
"flatData": {
"stringField": "Test"
}
},
{
"id": "e703eecb-deab-43bc-bc5e-bbe4028cdff4",
"flatData": {
"stringField": "test"
}
},
{
"id": "85a2be10-d39a-4ac5-aefb-5585d2b4fe39",
"flatData": {
"stringField": "TEST"
}
},
{
"id": "41464cd7-0d95-487c-a581-d25daaa42307",
"flatData": {
"stringField": "tEST"
}
}
]
},
...
}
You claim that the eq
operator should be case-insensitive, but that’s not the case:
Query:
{
queryTestContents (filter: "data/stringField/iv eq 'test'") {
id
flatData {
stringField
}
}
}
Response:
{
"data": {
"queryTestContents": [
{
"id": "e703eecb-deab-43bc-bc5e-bbe4028cdff4",
"flatData": {
"stringField": "test"
}
}
]
},
...
}
Query:
{
queryTestContents (filter: "data/stringField/iv eq 'Test'") {
id
flatData {
stringField
}
}
}
Response:
{
"data": {
"queryTestContents": [
{
"id": "4459f5c3-92c9-4555-a4fb-56d20cca6633",
"flatData": {
"stringField": "Test"
}
}
]
},
...
}
And so on.
You also mention that the tolower
function can be used, but that doesn’t work either:
Query:
{
queryTestContents (filter: "tolower(data/stringField/iv) eq 'Test'") {
id
flatData {
stringField
}
}
}
Response:
{
"errors": [
{
"message": "OData operation is not supported for query: ?$skip=0&$filter=tolower(data/stringField/iv) eq 'Test'.",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"queryTestContents"
],
"extensions": {
"code": "VALIDATION",
"codes": [
"VALIDATION"
]
}
}
],
"data": {
"queryTestContents": null
},
...
}
Please help me understand what I’m doing wrong. How can I achieve case-insensitive queries with the eq
operator in our Squidex instance? Our build version is: squidex:dev-8285
.