Skip to content

Statements with a generated api: Filtering on JSON array #1525

Answered by simolus3
llfbandit asked this question in Q&A
Discussion options

You must be logged in to vote

I think the easiest way would be to do WHERE CAST(json_each.value AS INT) = :locationId. In that case, the generator should be smart enough to know that you want an int. For json_each, we don't really know the type otherwise and we fall back to a string.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@llfbandit
Comment options

Answer selected by llfbandit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants