>
> As for bindings... I don't remember I saw any examples how to use them for
> adhoc queries like this. Is there any examples?
>

It's easy. Just use the base data type and create a new DataType from it:

DataType<OffsetDateTime> type =
SQLDataType.TIMESTAMP.asConvertedDataType(new MyBinding());

You can now use the above with val():


DSL.val(mydate, type);


It's essentially the same thing as what the code generator does.

Now, the question is why this worked for you before. Perhaps by accident?
>>
>
> That's exactly my question :)
>
> It worked because I built the query to do exactly what I needed, it wasn't
> an accident.
> I was doing some TDD experimenting with jOOQ 3.6.2.
>
> Lucky that I created a test for it and that test caught this change in
> behavior after I upgraded to the latest jOOQ (3.8.1).
> Note that I didn't touch any java code at all during the upgrade.
>
> Then I found the overload for OffsetDateTime and it magically worked.
>
> So I was just wondering if the change was intentional or not, because I
> couldn't find any mentions of that in the documentation.
>

No, there was no intention to change this. But perhaps, the PostgreSQL jdbc
driver does some magic that no longer applies with an explicit cast. From
the past years of discussing the TIMESTAMP WITH TIME ZONE type on this
list, I wouldn't be surprised...

-- 
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/d/optout.

Reply via email to