Re: Oracle 9i date-timestamp tip

2005-03-14 Thread Martin Kalén
Bruno CROS bruno.cros at gmail.com writes:

 it's important to note that mapping date attributes such as
 java.sql.Time java.util.Date (with hours ...) and even
 java.sql.Timestamp using DATE oracle type  IS NOT POSSIBLE since
 Oracle 9.2 !! (Hours are lost ... with all it can occurs too !)

FYI: we have patched the old Torque supplied with the OJB 1.0.x line of
releases. In the upcoming OJB 1.0.2 there is a modified Torque JAR with a
patched in profile oracle9 that can be used to make Torque generate TIMESTAMP
correctly for all timestamp columns (as well as correct BLOB/CLOB mappings).

In the OJB 1.1 line of releases OJB (and Torque) will use the DdlUtils [1]
project for SQL-generation.

Regards,
 Martin

[1] Formerly know as commons-sql in the Apache Jakarta Sandbox, currently under
migration to db.apache.org


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



Oracle 9i date-timestamp tip

2005-03-03 Thread Bruno CROS
Even if it has been already post, i just want to clarify the tip :

- according to Oracle 9i notes 

http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#08_01

it's important to note that mapping date attributes such as
java.sql.Time java.util.Date (with hours ...) and even
java.sql.Timestamp using DATE oracle type  IS NOT POSSIBLE since
Oracle 9.2 !! (Hours are lost ... with all it can occurs too !)

The first tip of Oracle is the best one. Replacing all DATE columns by
TIMESTAMP columns work very well, so you are not obliged to use
V8compatibility tip (what did not work for me (sorry!)) and can use
new 9i types.

For me, the problem was to keep on use Torque; Torque had to generate
oracle TIMESTAMP (instead of DATE) for all the jdbc columns DATE, TIME
and TIMESTAMP. I look in torque-3.0.2 archive, find a file name in
db.props in sql/base/oracle change the 3 lines and update jar with jar
tool. Torque now generates TIMESTAMP (according to 9i specifications)
for DATE, TIME and TIMESTAMP jdbc types. I don't think that torque
project can accept such a workaround...  job to have something clean
is bigger than that !!

Jdbc works now as before 9.2, with java.sql.timestamp, authorizing
comparisons and hours access on all java types... That's what we need
all !!

Regards to all posting here ;-)

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