db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Tramblay <benoit.tramb...@technomedia.ca>
Subject How make a SQL clause with doUpdate
Date Thu, 31 Jul 2003 21:43:41 GMT
Hello,
 
I want write this SQL Command with Torque
 
Update table
set col = ...,
     timeStamp = newTime
where id = ..
and timestamp  = oldTime
 
I tried to use the function ObjectPeer.doUpdate(Criteria, connection) with
this criteria but doesnt work.
 
    // Set
    criteria.add(ID, obj.getId());
    criteria.add(AU_LAST_UPDATE_DATE,updateDate);
    // Clause SQL
    criteria.add(AU_LAST_UPDATE_DATE, (Object)req , Criteria.CUSTOM); 

Thanks.
 
 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message