Hello,
I'm trying to use jOOQ 2.6.2 with PostgreSQL 9.1.7
I have table defined as
CREATE TABLE schedule(
...
duration INTERVAL NOT NULL,
...
);
Then I do code generation. Code generated for the duration field:
/**
* The table column <code>public.schedule.duration</code>
* <p>
* The SQL type of this item (interval) could not be mapped.<br/>
* Deserialising this field might not work!
*/
public final
org.jooq.TableField<ula.schema.v1.generated.tables.records.ScheduleRecord,
java.lang.Object> DURATION = createField("duration",
org.jooq.util.postgres.PostgresDataType.getDefaultDataType("interval"),
this);
Ok, I decided to continue with manual converting PGInterval objects. It was
also impossible, because when I try to insert line into the table, jOOQ
always try to determine SQL type of object as DefaultDateType without
dialect:
DefaultDataType.getDataType(null, valueType); //
https://github.com/jOOQ/jOOQ/blob/version-2.6.2/jOOQ/src/main/java/org/jooq/impl/Factory.java#L5993
And I get exception:
org.jooq.exception.SQLDialectNotSupportedException: Type class
org.postgresql.util.PGInterval is not supported in dialect null
at org.jooq.impl.AbstractDataType.getDataType(AbstractDataType.java:478)
at org.jooq.impl.Factory.mostSpecific(Factory.java:5993)
at org.jooq.impl.Factory.val(Factory.java:5968)
at org.jooq.impl.Factory.val(Factory.java:5932)
at org.jooq.impl.AbstractStoreQuery.addValue(AbstractStoreQuery.java:83)
at org.jooq.impl.InsertImpl.set(InsertImpl.java:224)
at org.jooq.impl.InsertImpl.set(InsertImpl.java:63)
Is it a bug or I just use jOOQ in wrong way?
--
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.