-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[5.8] Querying on json columns with boolean values broken #27696
Comments
Ping @staudenmeir |
Already on it. |
Boolean comparisons don't work with PostgreSQL or SQL Server either, but – as opposed to MySQL – they never have. Unfortunately, This is a complex issue, I'm not sure whether we can fix it. We would have to remove the The |
Another work around is:
|
@LorenzV No, that does not work. It's not that simple. |
@staudenmeir were you able to make any more progress on this? We're stuck waiting to see if there is anything that can be done about this before finalizing our upgrade to 5.8. |
@aaronhuisinga Not really. Using |
@setkyar why doesn't that work for your use case? |
@staudenmeir there's no way we might implement something custom for boolean values? |
We ought to make it work. This is a silent breaking change, resulting in a potentially dangerous data situation. Of course, it is possible to fix it. It's just that the solution may not look neat. Perhaps instead of using I don't think it will come to this, but rolling back #25732 would still be better since that was an annoyance but not truly a bug. If we supported non-string data types in the last Laravel version, we should continue supporting it in order to claim JSON support. |
@cmorbitzer we're currently not considering rolling back that PR. We should focus on fixing the current issue instead. |
I'm working on a solution, it will be ready tomorrow. |
@staudenmeir thanks! |
Description:
Trying to query on a database column of type json with a boolean value doesn't return results.
Example:
There is a workaround if we make the boolean value a string, the query works again.
Not really intuitive right now. Probably broken by #25732
Steps To Reproduce:
The text was updated successfully, but these errors were encountered: