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

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Feb 24 2005 - 10:55:32 EST

  • Next message: René Kulschewski: "AW: AW: AW: Problem with Date/Time-part"

    Besides this probably shouldn't matter - "types.xml" is not used in runtime.

    Another question is how do you obtain your objects? Is this a straight
    SelectQuery on ObjEntity, or is it something else, like SQLTemplate or
    ProcedureQuery? Sample code?

    Andrus

    > I'm using Oracle 9.
    >
    >> -----Ursprüngliche Nachricht-----
    >> Von: Mike Kienenberger [mailto:mkienen..laska.net]
    >> Gesendet: Donnerstag, 24. Februar 2005 16:47
    >> An: cayenne-use..bjectstyle.org
    >> Cc: cayenne-use..bjectstyle.org
    >> Betreff: Re: AW: Problem with Date/Time-part
    >>
    >> Andrus Adamchik <andru..bjectstyle.org> wrote:
    >> > That's strange ... The original mapping was incorrect. Out of 3
    >> time-related JDBC types (DATE, TIME, TIMESTAMP), only TIMESTAMP
    >> provides both date and time portions. So that fix still applies.
    >> >
    >> > Not sure what else can be wrong :-/ Are you sure that old *.map.xml
    >> copy is not sitting somewhere in CLASSPATH?
    >>
    >> Also, what version of Oracle are you using?
    >> Oracle 9 and 10 might need a different extended type mapping.
    >>
    >> Index: types.xml
    >> ==================================================================>
    >> RCS file:
    >> /cvsroot/cayenne/cayenne/src/cayenne/java/org/objectstyle/caye
    >> nne/dba/oracle/types.xml,v
    >> retrieving revision 1.3
    >> diff -u -r1.3 types.xml
    >> --- types.xml 29 Oct 2003 16:58:07 -0000 1.3
    >> +++ types.xml 24 Feb 2005 15:45:26 -0000
    >>.. -64,7 +64,7 @@
    >> <db-type name="DATE"/>
    >> </jdbc-type>
    >> <jdbc-type name="TIMESTAMP">
    >> - <db-type name="DATE"/>
    >> + <db-type name="TIMESTAMP"/>
    >> </jdbc-type>
    >> <jdbc-type name="TINYINT">
    >> <db-type name="SMALLINT"/>
    >>
    >>
    >> > > Hi,
    >> > >
    >> > > No, it does not work :-(. Any idea how to find the problem ?
    >> > >
    >> > > Thanks and best regards
    >> > > René
    >> > >
    >> > >> -----Ursprüngliche Nachricht-----
    >> > >> Von: Andrus Adamchik [mailto:andru..bjectstyle.org]
    >> > >> Gesendet: Donnerstag, 24. Februar 2005 15:17
    >> > >> An: René Kulschewski
    >> > >> Betreff: Re: Problem with Date/Time-part
    >> > >>
    >> > >> René,
    >> > >>
    >> > >> Just change DATE to TIMESTAMP for DbEntity - this should fix it.
    >> Hope this helps.
    >> > >>
    >> > >> Andrus
    >> > >>
    >> > >>
    >> > >> > Hello,
    >> > >> >
    >> > >> > I have a table in Oracle with column of type "Date". In
    >> > >> this column is
    >> > >> > a value with Date+Time (checked that with SQLplus).
    >> > >> > In Cayenne-modeler this column is DATE (DbEntity) and
    >> > >> java.util.Date
    >> > >> > (ObjEntity). But when i fetch this value with Cayenne and
    >> > >> assign it to
    >> > >> > another variable i get only the "Date"-part, time is
    >> "00:00:00".
    >> > >> >
    >> > >> > Do you have any idea what's wrong ?
    >>



    This archive was generated by hypermail 2.0.0 : Thu Feb 24 2005 - 10:55:34 EST