Bleh.

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

The exception from before:
org.jooq.exception.SQLDialectNotSupportedException: Type class 
org.postgis.PGgeometry is not supported in dialect null
at org.jooq.impl.DefaultDataType.getDataType(DefaultDataType.java:640)
at org.jooq.impl.Factory.mostSpecific(Factory.java:6857)
at org.jooq.impl.Factory.val(Factory.java:6833)
at org.jooq.impl.Factory.val(Factory.java:6803)
at org.jooq.impl.Utils.field(Utils.java:441)
at org.jooq.impl.UpdatableRecordImpl.addValue(UpdatableRecordImpl.java:254)
at org.jooq.impl.UpdatableRecordImpl.addValue(UpdatableRecordImpl.java:261)
at 
org.jooq.impl.UpdatableRecordImpl.addChangedValues(UpdatableRecordImpl.java:245)
at 
org.jooq.impl.UpdatableRecordImpl.storeInsert(UpdatableRecordImpl.java:162)
at org.jooq.impl.UpdatableRecordImpl.store(UpdatableRecordImpl.java:143)
at gis.Main.main(Main.java:123)


The code:

    private static <T> DataType<T> mostSpecific(T value, DataType<T> 
dataType) {
        if (value != null) {
            Class<?> valueType = value.getClass();
            Class<T> coercionType = dataType.getType();

            if (valueType != coercionType && 
coercionType.isAssignableFrom(valueType)) {
                return (DataType<T>) DefaultDataType.getDataType(null, 
valueType);
            }
        }

        return dataType;
    }

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?


-- 
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