Came across the same issue today, and as jOOQ features no. 5670
<https://github.com/jOOQ/jOOQ/issues/5670> and 5673
<https://github.com/jOOQ/jOOQ/issues/5673> seems to keep getting pushed
back, I implemented a intermediate custom solution (see github
The CustomDatatypeProcessor takes a java.nio.file.Path, reads it and
converts record data based on the TableRecord -> Fields -> Converter.
Reusing will need some changes, mainly in the coerce() method, but maybe
this will help someone who stumbles upon this thread.
On Friday, November 11, 2016 at 1:01:01 PM UTC+1, Rick Latrine wrote:
> when I have following field definition in a table:
> public final org.jooq.TableField<my.jooq.json.serialize.test.tables.
> records.TestRecord, org.joda.time.DateTime> TIME_UTC
> = createField("TIME_UTC",
> new my.jooq.json.serialize.test.converter.
> With following Converter:
> public class DateTimeConverter implements Converter<Long, DateTime>
> formatJson returns the field definition:
> So far so good, as I assumed that jOOQ would use the underlying database
> type in order to serialize and deserialize the JSON string easily.
> But the data part looks like this:
> formatJSON converts the custom data type from the fetched record by using
> (see: org.jooq.tools.json.JSONValue#toJSONString in github
> I expected the json serializer would use the converter to get the database
> type back as a Long value.
> Afterwards the deserializer is not able to turn the String value to BIGINT
> and renders it to a null value.
> My question: is this working as expected, is it a bug or is formatJSON not
> intended to be used with custom types?
> Thanks in advance
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
For more options, visit https://groups.google.com/d/optout.