db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Fox (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (TORQUE-94) DBOracle doesn't create proper TO_DATE() clause for TIMESTAMP(6) fields
Date Mon, 30 Jan 2012 19:55:10 GMT

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

Thomas Fox resolved TORQUE-94.

       Resolution: Fixed
    Fix Version/s: 4.0
         Assignee: Thomas Fox

Fixed. See org.apache.torque.generated.peer.DateTest.testSelectWithMillisecondsOnTimestampExactMatch()
and org.apache.torque.generated.peer.DateTest.testSelectWithMillisecondsOnTimestampMillisecondMismatch()
in the test project
> DBOracle doesn't create proper TO_DATE() clause for TIMESTAMP(6) fields
> -----------------------------------------------------------------------
>                 Key: TORQUE-94
>                 URL: https://issues.apache.org/jira/browse/TORQUE-94
>             Project: Torque
>          Issue Type: Bug
>          Components: Runtime
>    Affects Versions: 3.3-RC1
>         Environment: Java 1.5, Oracle 9i
>            Reporter: Brendan Miller
>            Assignee: Thomas Fox
>            Priority: Minor
>             Fix For: 4.0
> I observed when calling TablePeer.doDelete(tableObject) for an object that had a type="TIMESTAMP"
(stored as TIMESTAMP(6) in Oracle), it would not find the matching row to delete.  I tracked
this down to the SQL that was being generated omitted the milliseconds.
> A row in a table with a column called 'ENTRY_TIMESTAMP' has the value:
>     18-APR-07 AM
> as viewed by SQL*Plus.  The generated SQL fragment is
>     TO_DATE('18-APR-2007 03:41:56', 'DD-MM-YYYY HH24:MI:SS')
> as evidenced by DBOracle.java.  This is insufficient to match the milliseconds which
Village apparently use when inserting the record.
> To get around this, I have written my own buildCriteria() for these objects that excludes
the timestamp fields, but this is a temporary hack.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org

View raw message