"Where" clause with more than one column in "or" operator doesn't work properly #299
Replies: 3 comments
-
will take a look. Thanks for such a well description. |
Beta Was this translation helpful? Give feedback.
-
@alisabrigok - when you initialize an object with same key multiple times - only last one is taken into consideration by javascript. Its javascript not jsstore. check below screenshot I wonder why would you try something like that way - when you can use in query for multiple values with same column. e.g -
|
Beta Was this translation helpful? Give feedback.
-
Ah, that's silly of me. I was actually having this problem in my app with totally different columns, therefore with different keys. But for the sake of reproducibility, I wanted to use IDBStudio and didn't realize at all that what I was doing already doesn't make sense. Tested a couple of fields with the "or" operator in IDBStudio in a non-silly way, and all seems to be working fine. Sorry for taking your time. |
Beta Was this translation helpful? Give feedback.
-
"Where" clause with more than one column in "or" operator doesn't seem to work properly.
Below can be tried using IDBStudio with the existing Demo database:
The below query shows 29 results, which correct.
But below shows precisely the same result 29, which is incorrect. Because I am expecting to see the orders where employeeId is 6 or 3 or 1 or 4 or 5. Below shows me the exact same results as above, employeeId is 6 or 5.
The issue exists even if you try to use different operators under "or". For instance, the below query should also take the value "3" into consideration but instead, it also returns 29 as above.
Also, the issue isn't limited to the "select" query. It exists for "count" as well.
Below shows 29.
It seems while querying with the "or" operator, only the last key-value pair in the object is taken into consideration right now, others are ignored.
I hope the description is clear enough, thanks for the great work.
Beta Was this translation helpful? Give feedback.
All reactions