So I've tried to hack something together, but this is literally a hack:

https://gist.github.com/0x6e6562/51b0caf1ebb6d06d1ee2

This seems to work, for some value of work. This means that I can
INSERT and SELECT rows using the custom bindings with generated code.

But I think I'm missing the point on a number of the abstractions -
this feels like a terrible hack, on many levels.

Is there a better way?

On Tue, Dec 22, 2015 at 5:56 PM, Ben Hood <0x6e6...@gmail.com> wrote:
> I've made some progress with defining a binding for TIMESTAMPZ <->
> Instant but there's one aspect of the code generation I don't seem to
> be able to control:
>
> /**
>  * The column <code>SUBSCRIPTIONS.Z.DATEZ</code>.
>  */
> public final TableField<ZRecord, Instant> DATEZ = createField("DATEZ",
> org.jooq.impl.SQLDataType.TIMESTAMPWITHTIMEZONE.nullable(false), this,
> "", new InstantBinding());
>
>
> The generator correctly sets the type bound for the column, but
> somewhere it has a registry that infuses the TIMESTAMPWITHTIMEZONE
> type, but the mapping for this is DataType<OffsetDateTime>.
>
> Is there a way to coerce the field to be DateType<Instant> ?
>
> On Tue, Dec 22, 2015 at 5:02 PM, Ben Hood <0x6e6...@gmail.com> wrote:
>> On Tue, Dec 22, 2015 at 4:53 PM, Lukas Eder <lukas.e...@gmail.com> wrote:
>>> Interesting, I wasn't aware of this. Do you have a link?
>>
>> https://tonyhasler.wordpress.com/2010/09/04/tonys-tirade-against-timestamp-with-time-zone/
>>
>> This appears to have written in the context of 10g - it's difficult to
>> tell whether the limitations apply to 12c.

-- 
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 jooq-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to