db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashley Hayes <ashley.ha...@macalla.com>
Subject why does Torque select all the data of an object prior to a sav e ( update )
Date Fri, 17 Oct 2003 10:14:56 GMT
Hi,
	I was looking at the sql statements made by my torque application. I
noticed that if you retrieve an object from storage, SELECT .... FROM ...
WHERE ... 

 then update an attribute and call save , the all the data is retrieved
again and then the update statement executed

e.g. SELECT * FROM ... WHERE ID=1280
     UPDATE ... SET DATETIME = ?, STATUS_ID = ? WHERE ID = ?

The torque code that is causing this in  BasePeer:
public static void doUpdate(
        Criteria selectCriteria,
        Criteria updateValues,
        Connection con)
        throws TorqueException
{
 ....
}

Is this behaviour by torque design or the only way torque can update records
via the village library?
thanks
A

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message