Hi Thorsten,

Thanks for your message. Yikes. This will keep popping up. Perhaps the best
thing would be to throw an exception in this case.

The relevant change that introduced this regression for you is this, from
jOOQ 3.7.0:
https://github.com/jOOQ/jOOQ/issues/4554

A similar discussion is available on that ticket as well.

Both opinions are reasonable. The change was integrated prematurely, for
sure. The regression is too significant to warrant the relatively minor
benefit. But rolling back will lead to new regressions. I'm undecided about
how to move forward with this issue, as can be seen in #4554, which hasn't
gotten much attention in the recent past.

Thanks,
Lukas

On Sat, Nov 17, 2018 at 10:06 AM Thorsten Schöning <[email protected]>
wrote:

> Hi all,
>
> I'm in the process of upgrading jOOQ from 3.6.0 to 3.11.7 and have use
> cases in which I'm creating some batched INSERT statements always, but
> not always providing values to bind as well. I'm following the 2.
> example in the docs simply:
>
> https://www.jooq.org/doc/3.0/manual/sql-execution/batch-execution/#N4F28D
>
> I'm only calling "bind" in some loop iterating available data and
> checking some conditions if really need to bind at all. Sometimes this
> even results in no values at all.
>
> 3.6.0 seemed to handle those cases by not issueing statements in the
> end, 3.11.7 fails instead, because the database tells me it doesn't
> allow inserting null-values. The schema didn't change, so this means
> that with the former version of jOOQ the INSERT didn't reach the database
> at all, while now it does.
>
> Did this work by accident only in the past? I found it very useful to
> not need to care if data has been bound or not.
>
> Is the only workaround to care now using some flag or such if to
> execute or is there some official way to execute if anything has been
> bound only?
>
> Thanks!
>
> Mit freundlichen Grüßen,
>
> Thorsten Schöning
>
> --
> Thorsten Schöning       E-Mail: [email protected]
> AM-SoFT IT-Systeme      http://www.AM-SoFT.de/
>
> Telefon...........05151-  9468- 55
> Fax...............05151-  9468- 88
> Mobil..............0178-8 9468- 04
>
> AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
> AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow
>
> --
> 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].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to