-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conditions on boolean column type work unexpectedly #530
Comments
To my understanding, boolean can take only 2 values, so having a like condition on such a field doesn't seem very sensible. Despite that, I am with you that the query should be created correctly! In this case, it shouldnt match any records, but it does. |
Well... Thing is that atk4/data as such do not support What you have written above is wrong. I think you should have used expression in condition to define But I see that in atk4/ui it's also implemented without expression and that's wrong and unsafe. |
Hmm, I have quite some likes in my code, they work as wanted. Implementation is exactly as mvorisek has: |
Also, there are like tests for Persistence/Array_ . So atk data does support like it seems. Syntax there is as in mvoriseks example above:
Taken from PersistentArrayTest->testLike() |
I came to this when using Grid/CRUD search which adds I think |
Oh, you're right. BTW, when we will merge in that big Field refactor PR, then there will be |
@DarkSide666 Yes and no. Consider |
Issue not fixed with PR #532, verifying. |
When boolean field is added to a model like:
Then when condition like:
is added it filters all records with the flag set to 0, here is a part of the generated query:
instead of:
Check the behaviour of integer and date(time) types too.
The text was updated successfully, but these errors were encountered: