You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Daniel Huang <da...@cisco.com> on 2004/03/24 22:48:56 UTC

Resolution for the truncated time portion of DATE with Torque and Oracle 9i

Hi,

For those who are suffering the problem that the time portion of a DATE
column is truncated by Torque when using with Oracle 9i, here is the
resolution (for Torque 3.1):

Open up templates/sql/base/oracle/db.props.
Locate the lines
TIME = DATE
TIMESTAMP = DATE
and change to
TIME = TIME
TIMESTAMP = TIMESTAMP

Then for the columns that you want to preserve the time and date, make their
type TIMESTAMP.

Then run ant sql and ant insert-sql to (re)create your tables. Now you will
have the time portion. No code change needed.

BTW, Torque really is a great tool. It saves us many hours of coding and we
can easily change the data model with only minimum or none code changes,
even at the very late stage of development.

Thanks
Daniel


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: Resolution for the truncated time portion of DATE with Torque and Oracle 9i

Posted by Scott Eade <se...@backstagetech.com.au>.
Daniel Huang wrote:

>For those who are suffering the problem that the time portion of a DATE
>column is truncated by Torque when using with Oracle 9i, here is the
>resolution (for Torque 3.1):
>
>Open up templates/sql/base/oracle/db.props.
>Locate the lines
>TIME = DATE
>TIMESTAMP = DATE
>and change to
>TIME = TIME
>TIMESTAMP = TIMESTAMP
>
>Then for the columns that you want to preserve the time and date, make their
>type TIMESTAMP.
>
Would it be true to say that if you were using TIME or TIMESTAMP for 
Oracle you would always want to preserve the time portion of these 
columns?  If the answer is yes then we can update the values in CVS for 
the next release.

Scott

-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org