You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am facing a small problem with mongodb.
I use the jquery Query Builder to generate my queries in mongodb, however in my collection I have some columns of the object type, and my query needs to be able to check if the value actually exists.
For example:
This is the code that the querybuilder generates for me.
The problem is that there will not always be any columns, for example that part in bold does not exist. This code in mongodb returns "true"
I need my querybuilder, in the "is_not_empty" option also check if it exists, like this:
I'll try to find a way, you can also submit a PR if you have a nice solution.
I think iterating over all the keys until we find a valid operator is a good solution, and crash only when multiple operators are found (with the special case for "between" of course)
Hello,
I am facing a small problem with mongodb.
I use the jquery Query Builder to generate my queries in mongodb, however in my collection I have some columns of the object type, and my query needs to be able to check if the value actually exists.
For example:
{"$and":[{"custom_tags.lead.EMAILADD.value":{"$ne":""}}]}
This is the code that the querybuilder generates for me.
The problem is that there will not always be any columns, for example that part in bold does not exist. This code in mongodb returns "true"
I need my querybuilder, in the "is_not_empty" option also check if it exists, like this:
{"$and":[{"custom_tags.lead.EMAILADD.value":{"$exists": true, "$ne":""}}]}
I made this modification:
Apparently everything worked as it should, the problem is being setRulesFromMongo
my_builder.queryBuilder('setRulesFromMongo', rules);
How do I implement additional features in existing operators?
Thank you and sorry for my english...
The text was updated successfully, but these errors were encountered: