Hello, Thanks very much for your message. Unfortunately, I couldn't reproduce the problem. When I tried something similar to what you did, I got the expected empty string in the third column on both H2 and MySQL (I'm assuming you're using MySQL because of the backticks). Just to be sure, there isn't any trigger on your PRODUIT_ETABLISSEMENT table, nor any RecordListener, ExecuteListener, Converter, or Binding involved here?
Thanks, Lukas On Thu, Aug 20, 2020 at 10:18 AM [email protected] <[email protected]> wrote: > 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 > > -- > You received this message because you are subscribed to the Google Groups > "jOOQ User Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jooq-user/80e5e711-2e0e-4e5d-8010-4170a6310d73n%40googlegroups.com > <https://groups.google.com/d/msgid/jooq-user/80e5e711-2e0e-4e5d-8010-4170a6310d73n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/CAB4ELO6kQUdeUz83qN1DGFn-XOvC4_Q4t%3DRcmwpg5HYHTLD03Q%40mail.gmail.com.
