Thank you.

I already have a  patched village*.jar that enables me to store and
retrieve timestamps without truncation. However AFAICT it also does not
truncate dates, which is not in accordance with ANSI.

I believe that we still need a change to the templates or libraries so that
timetamps are stored and retrieved with full resolution and dates with 1day
resolution. Also, since in the OM code these objects are declared as
java.util.Date, the returned values should always be of type java.util.Date
and not java.sql.Timestamp or java.sql.Date.

It appears to me that some serious thinking and redesign is needed in this
area.



|---------+---------------------------->
|         |           "Daniel Huang"   |
|         |           <[EMAIL PROTECTED]|
|         |           om>              |
|         |                            |
|         |                            |
|         |           17-Jun-2004 17:44|
|         |           Please respond to|
|         |           "Apache Torque   |
|         |           Users List"      |
|         |           <[EMAIL PROTECTED]|
|         |           pache.org>       |
|         |                            |
|---------+---------------------------->
  
>-------------------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                                     |
  |                                                                                    
                                     |
  |                                                                                    
                                     |
  |       To:      "Apache Torque Users List" <[EMAIL PROTECTED]>                      
                             |
  |                                                                                    
                                     |
  |       cc:                                                                          
                                     |
  |       Subject: RE: Date vs timestamp with Oracle                                   
                                     |
  
>-------------------------------------------------------------------------------------------------------------------------|



Apply this patch to templates/sql/base/oracle/db.props:

Index: db.props
===================================================================
--- db.props    (revision 949)
+++ db.props    (revision 948)
@@ -19,8 +19,8 @@
 VARCHAR = VARCHAR2
 LONGVARCHAR = VARCHAR2 (2000)
 DATE = DATE
-TIME = TIME
-TIMESTAMP = TIMESTAMP
+TIME = DATE
+TIMESTAMP = DATE
 BINARY = LONG RAW
 VARBINARY = BLOB
 LONGVARBINARY = LONG RAW

Regards,
Daniel

-----Original Message-----
From: Raphael Mankin,,, [mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 10:19 AM
To: [EMAIL PROTECTED]
Subject: Date vs timestamp with Oracle

I have just changed some of my DB fields from DATE to TIMESTAMP, however
the
generated Oracle DDL is still DATE which drops the time part.

How do I get Torque to generate real date+time and not have to edit the DDL
by
hand?


BTW when I did this in mySQL I had no problems. I am using Torque 3.1.

--
                               Unfortunately, most programmers like to
                               program. Some of them would rather
                               program than eat or bathe.
                               - Larry Constantine


Raphael Mankin
E-Mail: [EMAIL PROTECTED]
----------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]









---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to