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)
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
Giving up for the night, but want to leave this here to make sure I'm thinking about this whole thing correctly.
I was under the impression that a converter is for when you come across a certain type of column data type and you want to change it to a java object.
Example... a table in my postgres db has columns of type timestamp. So I would declare timestamp in the types tag. This makes it so whenever I run a jooq query and one of the columns is of type timestamp, it will automatically trigger the converter class I have defined for that type and run the proper overridden method that tells how to convert it to my target result, ZonedDateTime.
You're saying it should be bigint over timestamp though... so am I completely wrong on all of this?
Thanks.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+unsubscribe@googlegroups.com.
Giving up for the night, but want to leave this here to make sure I'm thinking about this whole thing correctly.
I was under the impression that a converter is for when you come across a certain type of column data type and you want to change it to a java object.
Example... a table in my postgres db has columns of type timestamp. So I would declare timestamp in the types tag.
This makes it so whenever I run a jooq query and one of the columns is of type timestamp, it will automatically trigger the converter class I have defined for that type and run the proper overridden method that tells how to convert it to my target result, ZonedDateTime.
You're saying it should be bigint over timestamp though... so am I completely wrong on all of this?
<types>TIMESTAMP</types>
should have been
<types>.*TIMESTAMP.*</types>
--