Search with jooq if a jsonb column contains a specific value doesnt work properly
I have to create a query with jooq that checks to see if a jsonb column contains a specific value that I pass to it. I've tried doing something like this:
jooq.selectFrom(Tables.TRANSACTIONS_TABLE)
.where(
TRANSACTIONS_TABLE.MESSAGE
.contains(JsonNodeFactory.instance.objectNode().put("transactionId", transactionId))
)
.fetch { TransactionTable.fromRecord(it) }
But I'm not really sure why it's not working, it's not...