feathers-objection
feathers-objection copied to clipboard
Can I cast a field from the client side and have it reflected in the db query?
I'm trying to search on a field using $ilike
but the field is an integer.
Using Postgres
The query is simple amount::text $ilike '%100%'
. I would like to be able to indicate this from the clientside, but I can't seem to figure it out as the db will always wrap it with double quotes and throw an error.
This is what the query looks like:
where (("amount::text" ilike '%100%'))
This is the postgres / objection error:
operator does not exist: integer ~~* unknown