You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2009/12/28 21:23:29 UTC

[jira] Closed: (CAY-1088) Oracle TIMESTAMP handling

     [ https://issues.apache.org/jira/browse/CAY-1088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrus Adamchik closed CAY-1088.
--------------------------------

    Resolution: Duplicate

This has been fixed on trunk per CAY-1323 by Evgeny.

> Oracle TIMESTAMP handling
> -------------------------
>
>                 Key: CAY-1088
>                 URL: https://issues.apache.org/jira/browse/CAY-1088
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Cayenne Core Library
>    Affects Versions: 3.0
>         Environment: Cayenne 3.0 M4, Oracle 10g, Java 1.5, Windows 2003 Server, Oracle Thin JDBC Driver
>            Reporter: Malcolm Edgar
>            Assignee: Andrus Adamchik
>
> We have found that Cayenne 3.0 M4 is not assigning the correct extended type for Oracle TIMESTMAP columns when using the Oracle Thin JDBC driver.
> For this column type the Oracle driver ResultSetMetaData getJavaClass returns oracle.sql.TIMESTAMP. After decompiling this class we found that it extends a class called Datum which extends Object. The TIMESTAMP class does not extend java.util.Date, so Cayenne is not able to associate it with the correct extended type.
> The fix for this is relatively simple, see below, but we should roll this into the core framework.
> regards Malcolm Edgar
>         DataDomain domain = Configuration.getSharedConfiguration().getDomain();
>         
>         for (Iterator<DataNode> i = domain.getDataNodes().iterator(); i.hasNext();) {
>             DataNode node = i.next();
>             node.getAdapter().getExtendedTypes().registerType(new OracleUtilDateType() {
>                 public String getClassName() {
>                     return "oracle.sql.TIMESTAMP";
>                 }
>             });
>         }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.