Re: Convert Oracle DATE to LocalDateTime with Java Time types

2017-08-14 Thread Lukas Eder
Perfect, thanks for the feedback,
Lukas

2017-08-14 22:29 GMT+02:00 :

> Hi Lucas,
>
> Thanks for your response. I was able to make it work by just using
> ForcedType:
> forcedType {
> name = 'timestamp'
> types = 'DATE'
> }
> What's strange, is that I'm sure that was one of the first things I tried
> and it didn't work then. Maybe a typo. Anyway, it's not an issue for us
> anymore. Thanks for your help.
>
> Regards,
> Dima
>
> On Monday, August 14, 2017 at 8:13:38 AM UTC-7, Lukas Eder wrote:
>>
>> Hi Dima,
>>
>> Thanks for your message. That's interesting - ideally, the two flags
>> should work together, meaning that if you specify javaTimeTypes *and*
>> dateAsTimestamp, you should get LocalDateTime as a data type for DATE
>> columns.
>>
>> We'll look into this soon, probably a bug. I've registered an issue for
>> this:
>> https://github.com/jOOQ/jOOQ/issues/6497
>>
>> In the meantime, do note that dateAsTimestamp is deprecated and will be
>> removed in a future version of jOOQ. The way forward here is to use data
>> type rewriting or converters.
>>
>> Thanks again for your report,
>> Lukas
>>
>> 2017-08-09 1:51 GMT+02:00 Dima S :
>>
>>> When using *javaTimeTypes *flag LocalDate is generated for Oracle DATE
>>> columns. I wasn't able to find a way to force it to use LocalDateTime
>>> (similar to how *dateAsTimestamp *flag works). Currently, we are not
>>> using *javaTimeTypes *flag and instead are converting from Date to
>>> LocalDateTime using custom converter. I tried to keep the converter, but it
>>> doesn't work since LocalDate is substituted internally and the time portion
>>> is then lost anyway. Is there a way to do it that I missed? It prevents us
>>> from switching to new Java Time types in jOOQ.
>>>
>>> Thanks,
>>> Dima
>>>
>>> --
>>> 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+...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> 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.
>

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


Re: Convert Oracle DATE to LocalDateTime with Java Time types

2017-08-14 Thread dsharinov
Hi Lucas, 

Thanks for your response. I was able to make it work by just using 
ForcedType:
forcedType {
name = 'timestamp'
types = 'DATE'
}
What's strange, is that I'm sure that was one of the first things I tried 
and it didn't work then. Maybe a typo. Anyway, it's not an issue for us 
anymore. Thanks for your help.

Regards,
Dima

On Monday, August 14, 2017 at 8:13:38 AM UTC-7, Lukas Eder wrote:
>
> Hi Dima,
>
> Thanks for your message. That's interesting - ideally, the two flags 
> should work together, meaning that if you specify javaTimeTypes *and* 
> dateAsTimestamp, you should get LocalDateTime as a data type for DATE 
> columns.
>
> We'll look into this soon, probably a bug. I've registered an issue for 
> this:
> https://github.com/jOOQ/jOOQ/issues/6497
>
> In the meantime, do note that dateAsTimestamp is deprecated and will be 
> removed in a future version of jOOQ. The way forward here is to use data 
> type rewriting or converters.
>
> Thanks again for your report,
> Lukas
>
> 2017-08-09 1:51 GMT+02:00 Dima S >:
>
>> When using *javaTimeTypes *flag LocalDate is generated for Oracle DATE 
>> columns. I wasn't able to find a way to force it to use LocalDateTime 
>> (similar to how *dateAsTimestamp *flag works). Currently, we are not 
>> using *javaTimeTypes *flag and instead are converting from Date to 
>> LocalDateTime using custom converter. I tried to keep the converter, but it 
>> doesn't work since LocalDate is substituted internally and the time portion 
>> is then lost anyway. Is there a way to do it that I missed? It prevents us 
>> from switching to new Java Time types in jOOQ.
>>
>> Thanks,
>> Dima
>>
>> -- 
>> 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+...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

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


Re: Convert Oracle DATE to LocalDateTime with Java Time types

2017-08-14 Thread Lukas Eder
Hi Dima,

Thanks for your message. That's interesting - ideally, the two flags should
work together, meaning that if you specify javaTimeTypes *and*
dateAsTimestamp, you should get LocalDateTime as a data type for DATE
columns.

We'll look into this soon, probably a bug. I've registered an issue for
this:
https://github.com/jOOQ/jOOQ/issues/6497

In the meantime, do note that dateAsTimestamp is deprecated and will be
removed in a future version of jOOQ. The way forward here is to use data
type rewriting or converters.

Thanks again for your report,
Lukas

2017-08-09 1:51 GMT+02:00 Dima S :

> When using *javaTimeTypes *flag LocalDate is generated for Oracle DATE
> columns. I wasn't able to find a way to force it to use LocalDateTime
> (similar to how *dateAsTimestamp *flag works). Currently, we are not
> using *javaTimeTypes *flag and instead are converting from Date to
> LocalDateTime using custom converter. I tried to keep the converter, but it
> doesn't work since LocalDate is substituted internally and the time portion
> is then lost anyway. Is there a way to do it that I missed? It prevents us
> from switching to new Java Time types in jOOQ.
>
> Thanks,
> Dima
>
> --
> 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.
>

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


Convert Oracle DATE to LocalDateTime with Java Time types

2017-08-10 Thread Dima S
When using *javaTimeTypes *flag LocalDate is generated for Oracle DATE 
columns. I wasn't able to find a way to force it to use LocalDateTime 
(similar to how *dateAsTimestamp *flag works). Currently, we are not using 
*javaTimeTypes *flag and instead are converting from Date to LocalDateTime 
using custom converter. I tried to keep the converter, but it doesn't work 
since LocalDate is substituted internally and the time portion is then lost 
anyway. Is there a way to do it that I missed? It prevents us from 
switching to new Java Time types in jOOQ.

Thanks,
Dima

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