> Also I'm not saying that jOOQ should not support them at all, but maybe we > should consider the performance cost and complexity involved in doing so. > Here's a random pitch: Instead of having jOOQ making guesses, why not > provide options? Something like > ... > bind() -> normal bind, no casting > vs > bindStrict() -> forced cast bind > ... > And then let the users choose.
I completely agree with you. See #1735, to be implemented in jOOQ 2.6.0: https://github.com/jOOQ/jOOQ/issues/1735 This will include a Settings flag allowing for activating / deactivating automatic bind value casting by jOOQ. I'm still undecided for the default value of this flag - true (casting active): backwards-compatible - false (casting inactive): "principle of least surprise" Note that explicit casting is always possible, too: http://www.jooq.org/javadoc/latest/org/jooq/Field.html#cast%28org.jooq.DataType%29
