Op.ne, Op.not and Op.notIn exclude null values automatically #16894
Unanswered
Vitomir2
asked this question in
Help & Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all :)
I have found that the abovementioned operators are excluding records that contain null values. I don't know if this is a bug or this is how it works. I know that null is treated as unknown or undefined value SQL databases, but still, I think this shouldn't be the case. Here is the code:
As we can see, I am looking for records that are with current
user.id
andprovider != "main-provider"
. This correctly applies the filter as I can see in the terminal, however, it excludes the records that areprovider = NULL
. I have found this as a workaround:I will be very happy if one can explain to me if that is how it is supposed to be working. I do not like this workaround, because the previous variant seems more meaningful to me and requires less code/conditions.
Beta Was this translation helpful? Give feedback.
All reactions