Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 359587

Summary: DBWSBuilder should map Oracle 'DATE' columns to java.sql.Timestamp
Product: z_Archived Reporter: Mike Norman <michael.norman>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipselink.dbws-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 359130    
Bug Blocks:    

Description Mike Norman CLA 2011-09-30 12:13:27 EDT
related to bug #359130

The following table DDL:
  CREATE TABLE SECONDARY (
    EMPNO NUMERIC(4),
    ENAME VARCHAR(10),
    JOB VARCHAR(9),
    MGR NUMERIC(4),
    HIREDATE DATE,
    SAL DECIMAL(7,2),
    COMM DECIMAL(7,2),
    DEPTNO NUMERIC(2),
    PRIMARY KEY (EMPNO) 
  )

uses Oracle's DATE column type for the field HIREDATE. Unlike other DB platform,
Oracle's DATE type includes time information as well.

In the static helper methods
 org.eclipse.persistence.tools.dbws.Util>getXMLTypeFromJDBCType 
 org.eclipse.persistence.tools.dbws.Util>getJDBCTypeFromTypeName

DATE is mapped to java.sql.Date and {xsd}date - for Oracle platform
we need to override this 'natural' mapping to use Timestamp so that
Oracle DATA column information is not lost
Comment 1 Mike Norman CLA 2012-01-23 11:58:03 EST
Upon further research, the information leading up to entering this bug
is wrong: Oracle's DATE datatype does NOT hold information beyond the
second precision: use of java.sql.Data and xsd:date is correct.
Comment 2 Mike Norman CLA 2012-01-23 12:04:55 EST
closed
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:34:45 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink