As you now have deprecated the use of dateAsTimestamp, it is not so clear 
to me how to achieve the same effect using bindings only. I tried to create 
and use a binding (implementing Binding<Date, Timestamp>) similar to your 
org.jooq.impl.DateAsTimestampBinding, but this results in loosing the time 
component of the Oracle date. So as of now, I'm stuck with using the 
dateAsTimestamp flag.

(This reply (with a small edit) is also posted as a comment to 
http://stackoverflow.com/a/23569699/1282989.)

fredag 9. mai 2014 18.33.17 UTC+2 skrev Lukas Eder følgende:
>
> Hi Vijay,
>
> By default, jOOQ maps Oracle's DATE column to java.sql.Date and TIMESTAMP 
> to java.sql.Timestamp.
> If you want to use Oracle's historic DATE semantics (date-time with 
> seconds precision), then you can have jOOQ generate java.sql.Timestamp 
> columns also for DATE columns using the <dateAsTimestamp/> code generation 
> flag:
>
>   <!-- Generate java.sql.Timestamp fields for DATE columns. This is
>        particularly useful for Oracle databases.
>        Defaults to false -->
>   <dateAsTimestamp>false</dateAsTimestamp>
>
>
> Details here:
> http://www.jooq.org/doc/latest/manual/code-generation/codegen-advanced/
>
> For the reference, I'll also post this as an answer to your Stack Overflow 
> question:
> http://stackoverflow.com/q/23560232/521799
>
> Cheers
> Lukas
>
>
> 2014-05-09 12:04 GMT+02:00 <[email protected] <javascript:>>:
>
>> My database is Oracle 11g. I have a table with a column of type DATE. 
>> While i select the rows from this table the date fields has date but with 
>> no time. What do I do to retrieve the date with time.
>>
>> thanks
>> --Vijay
>>
>> -- 
>> 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] <javascript:>.
>> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to