Hello,
i'm new JOOQ user and during a loadCSV, jooq attemps to insert a null value (my field is numeric and not nullable so i have an exception) , the value for the field in CSV is empty
I tried the nullString parameter without success
CSV (it's the third value) :
ABJ;NOVA100;
ABJ;PLAS148; 46
the java code:
ctx.loadInto(Tables.PRODUIT_ETABLISSEMENT)
.onDuplicateKeyUpdate()
.loadCSV(temporaryFileSQL)
.fields(Tables.PRODUIT_ETABLISSEMENT.ETACODE,Tables.PRODUIT_ETABLISSEMENT.PSCODE, Tables.PRODUIT_ETABLISSEMENT.PSSTK)
.ignoreRows(0)
.nullString("{null}")
.quote('\'')
.separator(';')
.execute();
the exception :
org.jooq.exception.DataAccessException: SQL [insert into `ubipharm02`.`produit_etablissement` (`etacode`, `pscode`, `psstk`) values (?, ?, ?) on duplicate key update `ubipharm02`.`produit_etablissement`.`psstk` = ?]; (conn=249564) Column 'psstk' cannot be null
i don't understand why jooq remplace the empty by null
Thank you