I use knex and objection.js with a postgresQL database. I updated knex from version 0.19.5 to 1.0.3 and part of one of my query stopped working. One of my table has a 'metadata' column, which is jsonb. The metadata object can contain a keyword property, which is an array of strings. I want to query for the presence of a word in that array.
Before:
.where('Source.name', 'ilike', `%${search}%`)
.orWhere('Attribution.normalizedName', 'ilike', `%${search}%`)
.orWhere('Source.abstract', 'ilike', `%${search}%`)
.orWhere('Source.description', 'ilike', `%${search}%`)
.orWhereJsonSupersetOf('Source.metadata:keywords', [search])
This was working before I upgraded, but now I get an error saying that 'column Source.metadata:keywords does not exist'
I didn't see anything in the knex changelog that explained a breaking change there. (this was done with objection.js version 2.1.3)