Bugs item #538236, was opened at 2002-04-02 19:44
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=538236&group_id=22866

Category: JBossCMP
Group: v3.0 Rabbit Hole
Status: Open
Resolution: None
Priority: 5
Submitted By: Stephen Coy (scoy)
Assigned to: Dain Sundstrom (dsundstrom)
Summary: Oracle data mappings use TIMESTAMP type

Initial Comment:
The standardjbosscmp-jdbc.xml tries to use the 
TIMESTAMP datatype for mapping java.util.Date to 
an sql type for both Oracle7 and Oracle8 
databases:

         <mapping>
            <java-type>java.util.Date</java-type>
            <jdbc-type>TIMESTAMP</jdbc-type>
            <sql-type>TIMESTAMP</sql-type>
         </mapping>

TIMESTAMP is not a valid Oracle7/8 datatype. 
Unfortunately there does not seem to be any kind 
of equivelent that we can use here. Oracle DATE 
types only have a granularity of whole seconds.

I will investigate whether or not we can get away 
with using a NUMBER type here.



----------------------------------------------------------------------

>Comment By: Stephen Coy (scoy)
Date: 2002-04-10 11:51

Message:
Logged In: YES 
user_id=463096

It looks like we have to map TIMESTAMP to SQL DATE 
for Oracle 7&8. We should put a comment in the file 
remarking upon the loss of granularity - and that the 
user must either store milliseconds as a long (see 
java.util.Date.getTime()) or use Oracle 9 if this 
behaviour is needed.

In the meantime, I think I've located a version of 
Oracle9i, so I will see what I can do for a data mapping.


----------------------------------------------------------------------

Comment By: Stephen Coy (scoy)
Date: 2002-04-10 10:33

Message:
Logged In: YES 
user_id=463096

We need a new set of mappings for Oracle9 (which is 
basically their big move to Java in general). 
Unfortunately, I don't yet have access to this, so it's not 
practical for me to do it.
I *will* however, get to the bottom of whether or not we 
can use a NUMBER type for this purpose in Oracle7/8.

----------------------------------------------------------------------

Comment By: Dain Sundstrom (dsundstrom)
Date: 2002-04-10 02:32

Message:
Logged In: YES 
user_id=251431

What is the answer?  Should we make a new mapping for 
Oracle 9i?  Is either of you willing to create a new 
mapping for 9i (based on the 8 mapping)?


----------------------------------------------------------------------

Comment By: Markus Kling (mkling)
Date: 2002-04-07 02:30

Message:
Logged In: YES 
user_id=360804

Up to version 8.1.7, Oracle supports only one temporal 
datatype: DATE, which has a granularity of second.

The following datatypes are new for Oracle9i:
     TIMESTAMP TIMESTAMP [ (fractional_seconds_precision)] 
     TIMESTAMP WITH [LOCAL]TIME ZONE
     INTERVAL YEAR TO MONTH
     INTERVAL DAY TO SECOND
 
fractional_seconds_precision optionally specifies the 
number of digits in the fractional part of the SECOND 
datetime field and can be a number in the range 0 to 9. The 
default is 6.

Below 9i date columns can be written and read as 
java.sql.Timestamp - the ms just get truncated.

-Markus

----------------------------------------------------------------------

Comment By: Peter Levart (plevart)
Date: 2002-04-07 02:10

Message:
Logged In: YES 
user_id=346981

Are you sure? It works for me. It might be that this is a 
new feature of Oracle 9i (I haven't tried with Oracle 7 or 
8).


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=538236&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to