-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot insert varchar[] column value using jooq #16671
Comments
Tried Using DSL.val(array, SQLDataType.VARCHAR.getArrayDataType()) Same error |
Thanks for your message. I'm not aware of any such limitation, though all of the versions you've shown are very dated. You probably have your reasons for sticking to outdated libraries... But to help you, I'll have to see at least:
The main hint I'm seeing is "Data type not supported: 1111", where |
Actual behavior
DB Schema
CREATE TABLE sanctions.sanction_suspension
(
id bigserial not null,
sanction_id varchar(255) NOT NULL,
suspension_status int NOT NULL,
created_on timestamp not null default now(),
last_updated_on timestamp not null default now(),
suspension_reasons varchar[],
CONSTRAINT sanction_id_unique UNIQUE (sanction_id),
CONSTRAINT sanction_suspension_pk PRIMARY KEY (id)
);
jooq Generated Column
Code to insert values into table
Error:
org.jooq.exception.DataAccessException: SQL [insert into "sanctions"."sanction_suspension" ("created_on", "sanction_id", "suspension_reasons", "suspension_status", "last_updated_on") values (cast(? as timestamp), ?, ?::varchar[], ?, cast(? as timestamp))]; [Amazon]JDSI Data type not supported: 1111] with root cause
Expected behavior
Should insert the value
Steps to reproduce the problem
Create a postgres table with varchar[] column
Run jooq code generation Tool (mvn clean package -DskipTests -Pjooq)
Run maven Application
Use DSL to insert data into the column
jOOQ Version
3.10.4
Database product and version
Postgres 9.4.1212
Java Version
8
JDBC / R2DBC driver name and version (include name if unofficial driver)
org.postgresq:postgresq:9.4.1212
The text was updated successfully, but these errors were encountered: