Hello, I am currently working on migrating jOOQ from version 3.11.3 to 3.14.9 and making all the necessary changes. For the most part, the migration is complete, but when I deploy my code and insertions/updates are made (via DSLContext's executeInsert and executeUpdate) to our Postgres DB via jOOQ DSL methods, for resources that have been created via jOOQ code generation from a production table, I am encountering an indexing issue.




I have included relevant screenshots above that indicate the indexing issue (note I have intentionally omitted parts of the stack trace for privacy reasons), please ask if you have any questions.
Here is a relevant code snippet from our binding class that is very similar to the example in the documentation, was wondering if anything seemed off? Left out a couple details, but basically this binding is for generic custom List<T> and we have other classes extending it with the actual converter with to() and from() methods, where we basically just use GSON to convert between JSONB and our custom class. We have unit tests that test the converter's to() and from() methods so the issue shouldn't be arising from the converter.
@Override
public void sql(final BindingSQLContext<List<T>> bindingSQLContext) throws SQLException {
// Depending on how you generate your SQL, you may need to explicitly distinguish
// between jOOQ generating bind variables or inlined literals.
if (bindingSQLContext.render().paramType() == ParamType.INLINED) {
bindingSQLContext.render().visit(DSL.inline(bindingSQLContext.convert(converter()).value())).sql("::jsonb");
} else {
bindingSQLContext.render().sql(bindingSQLContext.variable()).sql("?::jsonb");
}
}
@Override
public void register(final BindingRegisterContext<List<T>> bindingRegisterContext)
throws SQLException {
bindingRegisterContext.statement().registerOutParameter(bindingRegisterContext.index(), Types.VARCHAR);
}
@Override
public void set(final BindingSetStatementContext<List<T>> bindingSetStatementContext)
throws SQLException {
JSONB json = bindingSetStatementContext.convert(converter()).value();
bindingSetStatementContext.statement().setString(bindingSetStatementContext.index(), json != null ? json.data() : null);
}
@Override
public void set(final BindingSetSQLOutputContext<List<T>> bindingSetSQLOutputContext)
throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
public void get(final BindingGetResultSetContext<List<T>> bindingGetResultSetContext)
throws SQLException {
bindingGetResultSetContext.convert(converter()).value(JSONB.valueOf(bindingGetResultSetContext.resultSet().getString(bindingGetResultSetContext.index())));
}
@Override
public void get(final BindingGetStatementContext<List<T>> bindingGetStatementContext)
throws SQLException {
bindingGetStatementContext.convert(converter()).value(JSONB.valueOf(bindingGetStatementContext.statement().getString(bindingGetStatementContext.index())));
}
@Override
public void get(final BindingGetSQLInputContext<List<T>> bindingGetSQLInputContext)
throws SQLException {
throw new SQLFeatureNotSupportedException();
}