kitchen-site
kitchen-site copied to clipboard
Error saving data: MongoError: The dollar ($) prefixed field '$ne' in 'data.application.queries.19.filter.userId.$ne' is not valid for storage.
Hi @perak
I would like to create a filter little bit tricky to be able to display all results or just a single userId results in a dataview.
I tried to use a ne
operator but the GUI complains.
{ "userId" : {"$ne" : "null"} }
Cheers
@l1br3 known bug. Query Filter and Options are stored in json format as part of kitchen input file, and mongo operators cannot be stored in database in that form. My solution is to store filter and options as strings (I need to do it anyway because options amd filter should be entered as javascript objects, not in json format). I will try to change that today (preparing to publish latest cli version today anyway). Count 12 hours afrer now...
Thanks @perak !
@l1br3 changed CLI to accept query filter and options both in json and string format (json will be removed in the future) but I cannot publish that before I change both old and new GUI to work with strings (because metadata info for the object is changed and GUI's now assume filter and options are strings, not objects).
So... my prediction "12 hours after now" didn't work - sorry.
Next prediction... maybe 24 hours after now.
Hi @perak, no worries I'm someone patient ;) Thanks for your work
@l1br3 new GUI is updated, but nothing published yet - need to fix old GUI too. Got workload here, but I'll try to make something (again - 24 hours after now). :)
Go on @perak ! ;)
Hi @perak I encounter a new issue on the old GUI and I guess it is related to this issue.
This filter countains linebreak and it breaks the generator.
{
"name": "admin_keyword",
"collection": "Keyword",
"find_one": true,
"filter": "{\n\t\"_id\": \":keywordId\"\n}",
"options": "{}"
}
Ok thank you! I'll see what I can do
I have problem use $ne in the new GUI. How to use ? Have you an example ? Thanks
Hi @mttstt Filter and Options in GUI should be json, not js, so if you try:
{ $ne: null }
that will not work, you must enclose property names into quotes, so this works: { "$ne": null }