Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359587 - DBWSBuilder should map Oracle 'DATE' columns to java.sql.Timestamp
Summary: DBWSBuilder should map Oracle 'DATE' columns to java.sql.Timestamp
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 359130
Blocks:
  Show dependency tree
 
Reported: 2011-09-30 12:13 EDT by Mike Norman CLA
Modified: 2022-06-09 10:34 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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