Re: AW: AW: AW: Problem with Date/Time-part

From: Mike Kienenberger (mkienen..laska.net)
Date: Fri Feb 25 2005 - 09:23:47 EST

  • Next message: Orion Fields: "Re: Synchronization/Deadlock"

    =?iso-8859-1?Q?=22Ren=E9_Kulschewski=22?= <KU..vu.de> wrote:
    > I added the following code to UtilDateType.java (Cayenne 1.2M2) and than
    it
    > works (at least for me):

    I think I must have missed something, so let me summarize because I'm
    probably operating on wrong assumptions.

    You want to get back a value with a date and time portion.
    But you're hitting code that's using a jdbc DATE type. (Shouldn't matter if
    you're using an Oracle DATE or an ORACLE TIMESTAMP value in the actual
    database).
    The jdbc Date type is only supposed to return the date portion, not the time
    portion.

    Assuming that's all the case,

    As Andrus said in:

    http://objectstyle.org/cayenne/lists/cayenne-user/2005/02/0304.html

    you should be using a Types.TIMESTAMP jdbc type.

    So either the model is incorrectly mapping your selected jdbc type TIMESTAMP
    value to jdbc type DATE, or you don't have jdbc type TIMESTAMP specified in
    your model.

    Here's a configuration I use in production that has both jdbc Date and jdbc
    Timestamp columns. I've not hit any of these problems myself. We've used
    both the oci and thin drivers, so I don't think that would matter either.
    We have had other strange problems with other driver versions, particularly
    in using optimistic locking with Oracle Timestamp fields under the Oracle 9
    jdbc drivers.

    Ebpp DEBUG [Orion Launcher 02-10 10:45:32] QueryLogger: Database Product
    Version is Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.5.0 - Production
    Ebpp DEBUG [Orion Launcher 02-10 10:45:32] QueryLogger: JDBC Driver Name is
    ........ Oracle JDBC driver
    Ebpp DEBUG [Orion Launcher 02-10 10:45:32] QueryLogger: JDBC Driver Version
    is ..... 10.1.0.3.0



    This archive was generated by hypermail 2.0.0 : Fri Feb 25 2005 - 09:23:00 EST