-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Casting JSON fields in where clause #4257
Labels
type: feature
For issues and PRs. For new features. Never breaking changes.
Comments
I think I talked with @mickhansen about this previously, and we'd really like this to be transparent for the user, so the value is casted automagically. |
janmeier
added
the
type: feature
For issues and PRs. For new features. Never breaking changes.
label
Aug 5, 2015
Hi @janmeier @mickhansen how to cast values in JSON? Related: #11998 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I can't really figure if this is supported or not. I'm basically trying to query by equality on a boolean value inside a JSON object:
This throws a n
operator does not exist: text = boolean
error. Basically the query needs a::boolean
cast at the end of it, and I'm not totally sure if that's even possible in Sequelize.As a workaround, I can just change
true
to'true'
, but I'd rather not do that if I don't have to.The text was updated successfully, but these errors were encountered: