Hi,

I'm trying to run a simple select like so:

List<Foo> foos = create.select()
   .from(FOO)
   .limit(pageable.getPageSize())
   .offset(pageable.getOffset())
   .fetchInto(Foo.class);



I'm getting this error:


org.jooq.exception.MappingException: An error ocurred when mapping record to 
class Foo
        at 
org.jooq.impl.DefaultRecordMapper$MutablePOJOMapper.map(DefaultRecordMapper.java:658)

        ...

Caused by: org.jooq.exception.DataTypeException: Cannot convert from 
1479365948726 (class java.lang.Long) to class java.time.ZonedDateTime
        at org.jooq.tools.Convert$ConvertAll.fail(Convert.java:1118)
        at org.jooq.tools.Convert$ConvertAll.toDate(Convert.java:1070)
        at org.jooq.tools.Convert$ConvertAll.from(Convert.java:789)
        at org.jooq.tools.Convert.convert0(Convert.java:316)
        at org.jooq.tools.Convert.convert(Convert.java:308)
        at org.jooq.tools.Convert.convert(Convert.java:380)
        at org.jooq.impl.AbstractRecord.get(AbstractRecord.java:243)
        at 
org.jooq.impl.DefaultRecordMapper$MutablePOJOMapper.map(DefaultRecordMapper.java:694)
        at 
org.jooq.impl.DefaultRecordMapper$MutablePOJOMapper.map(DefaultRecordMapper.java:614)


I'm using jooq 3.8.6 with a postgresql database. Does anyone have any ideas 
why? My Foo.java entity does have some ZonedDateTime fields. I'm guessing 
jooq doesn't support these? If that's the case, which date/time type should 
I be using?

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