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

From: René Kulschewski (KU..vu.de)
Date: Mon Feb 28 2005 - 02:47:41 EST

  • Next message: tnaki..ofthome.net: "cayenne vs. LLBL"

     

    > -----Ursprüngliche Nachricht-----
    > Von: Mike Kienenberger [mailto:mkienen..laska.net]
    > Gesendet: Freitag, 25. Februar 2005 15:24
    > An: cayenne-use..bjectstyle.org
    > Cc: cayenne-use..bjectstyle.org
    > Betreff: Re: AW: AW: AW: Problem with Date/Time-part
    >
    > =?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.

    Yes. In the table the column type is "Date".

    >
    > 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.

    I do that.

    > 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.

    I have.

    It looks to me that Cayenne gets the info from the JDBC driver that it is a
    "DATE" type, and even if it's mapped to a TIMESTAMP, in UtilDateType.java a
    "rs.getDate(index)" is issued, so the "time part" is lost.

    If it matters: I'm using the 9.2.0.5 jdbc driver with a 9.2.0.5 database.

    Regards
    René



    This archive was generated by hypermail 2.0.0 : Mon Feb 28 2005 - 02:47:52 EST