> Allow me to be more clear headed about this and less... uh confused. :-)

Hehe

> It seems to me I don't understand this function - if we have a
> SQLDataType.OTHER here then the type is always assignable, which leads us
> into getDataType() which will always throw an exception.
> If the type is OTHER, then we really shouldn't be trying to "find" any type,
> just returning type OTHER and be done with it?

Hmm, that mostSpecific() method was explicitly introduced in order to
"downcast" a DataType such as OTHER to a more specific data type, if
such "more specific type information" is available. Whew. This was
issue #2007 as stated in the method's Javadoc:
https://github.com/jOOQ/jOOQ/issues/2007

A use-case for this is the following predicate:
create.fieldByName("TEST_COLUMN").lessThan(now)

The left-hand side of the predicate lacks type information
(Field<Object>), so the bind value from the right-hand side should not
be OTHER, but some more specific data type.

But still, there should be no NullPointerException. I have registered
#2267 for this. I'll try to reproduce this and see if it can be fixed,
soon...
https://github.com/jOOQ/jOOQ/issues/2267

Cheers
Lukas

-- 
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/groups/opt_out.


Reply via email to