Result from below mentioned code does not carry the data from DB.
let result = await wixData.query("ClientRolesAccess").eq("clientId", currentClientId).contains("roleName", desig).find();
Even though I’ve data in the DB, I’m not getting any result from this query. When I tried to debug, I found the result coming as follow:
"{"items":[],"length":0,"totalCount":0,"query":{"invalidArguments":[],"filterTree":{"$and":[{"clientId":"6beaddb6-54ce-4489-972a-c1c341f02c07"},{"roleName":{"$contains":"Junior"}}]},"provider":{},"collectionName":"ClientRolesAccess","limitNumber":50,"skipNumber":0,"included":[]}}"
It mentions something like (“query”:{“invalidArguments”) but I’ve no clue what is invalid in my query, I’ve double check all the arguments populating properly, as follow:
currentClientId = b4456331-3321-4aad-9852-5c7906395f19
desig = Junior
Another funny thing is that, in preview mode it works perfectly fine, whereas, in live it returns the message as follow. (Not even as an error).
Anybody has any idea, what am I doing wrong? Is there something that I can do?
Please help!