Re: Problem with Date/Time-part

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Feb 24 2005 - 11:58:04 EST

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

    Maybe it doesn't, but Oracle driver is a strange beast. Could you try
    using SQLTemplate with a "#result" directive
    (http://objectstyle.org/cayenne/userguide/fetch/sqltemplate-scripting.html).
    In your sqlString variable replace all date columns with scriplets like
    this one:

    #result('creation' 'java.sql.Timestamp')

    Does it change anything?

    Andrus

    > Hi,
    >
    > This is a sample. But the access method doesnt matter IMHO, even if i
    > access a object by ObjA.getToObjB() it is the same behaviour.
    >
    > -->
    > public List findUnprocessed() {
    >
    > String sqlStr = "select id, comdeviceevnmeth_id,
    > isacknowledge, comdevice_id, "
    > + "txdatetime, rxdatetime, gpstime,
    > gpslongitude, gpslatitude, "
    > + "directionofmotion, velocity,
    > locationangle, locationdescription, "
    > + "locationdistance, t.indata.getclobval()
    > indata, creation, "
    > + "creationby, modification, modificationby,
    > isdeleted, "
    > + "comdeviceevnstate_id, tour_id "
    > + "from comdeviceevent t where
    > t.comdeviceevnstate_id=1"
    > + " order by
    > t.comdevice_id,t.txdatetime,t.gpstime";
    >
    > List retval = null;
    >
    > DataContext ctx _SingletonDataContext.getInstance().getCtx();
    >
    > SQLTemplate rsCde = new SQLTemplate(Comdeviceevent.class,
    > sqlStr, true);
    >
    > retval = ctx.performQuery(rsCde);
    >
    > return retval;
    > }
    >
    > <--
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Thu Feb 24 2005 - 11:58:06 EST