db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Loucks" <aar...@GardnerInc.com>
Subject TIMESTAMP fields and doUpdate()
Date Tue, 23 Aug 2005 19:50:36 GMT
Is there a way to have Torque not set the value for a field declared as
TIMESTAMP? It appears that saving an object or performing doUpdate(obj)
will set the value of a timestamp field just as it would with any other
field. Id much rather let the backing database change the value of the
timestamp field rather than having to do something like:


MyTorqueObject obj = MyTorqueBaseObject.retrieveByPK(x);

obj.setSomeOtherField("a string value");

obj.setTimeStampField(new Date());

MyTorqueObject.save() ;

/* or MyTorqueObjectBasePeer.doUpdate(obj) */



I guess I could override the doUpdate() and save() methods but I'm
hoping that I've overlooked something in the schema or runtime
properties.. any suggestions?




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