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
When querying a property inside a json field with a bool argument, the query returns 0 rows. However, if you embed the bool into the where clause itself, you get 1 row. The strange thing is that the generated SQL shown by the debugger is identical.
I tried testing a variety of other variations as well, like using json_extract and the double arrow syntax, like config->>'$.enabled'. The same thing also happens with nested values, such as config->'$.foo.enabled' = true.
The text was updated successfully, but these errors were encountered:
GORM Playground Link
go-gorm/playground#729
Description
When querying a property inside a json field with a bool argument, the query returns 0 rows. However, if you embed the bool into the where clause itself, you get 1 row. The strange thing is that the generated SQL shown by the debugger is identical.
Broken Example:
Working Example:
I tried testing a variety of other variations as well, like using
json_extract
and the double arrow syntax, likeconfig->>'$.enabled'
. The same thing also happens with nested values, such asconfig->'$.foo.enabled' = true
.The text was updated successfully, but these errors were encountered: