You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Ashley Hayes <as...@macalla.com> on 2003/12/03 11:26:33 UTC
RE: why does Torque select all the data of an object prior to a
save ( update )
Ramesh,
Sorry no replies to my message. Initially I was concerned with the
performance of multiple updates to my object. But your message "Torque 3.1
and Prepared Statement" highlights the "EXTRA" select as a serious problem
when using torque with oracle.
I say "EXTRA" because I have debugged a lot of the torque code and can't
see any reason for it. If its to make sure the record exists, a more
optimistic approach is to check the count of updated records is 1 (UPDATE
blah SET ..... WHERE $PRIMARY_KEY_FIELD = ... ) throwing an exception
otherwise...
I've been moved off our torque based project so have not had time to try and
patch the problem,
sorry I could not be of more help,
Ashley
-----Original Message-----
From: Ramesh Sabeti [mailto:rs@reazon.com]
Sent: 01 December 2003 23:11
To: 'Apache Torque Users List'
Subject: RE: why does Torque select all the data of an object prior to a
save ( update )
Ashley,
Did you find an answer to your question, or find a solution? I'm
running into the same problem. It's crashing the Oracle server after a
few days of use.
Ramesh.
> -----Original Message-----
> From: Ashley Hayes [mailto:ashley.hayes@macalla.com]
> Sent: Friday, October 17, 2003 3:15 AM
> To: Torque-User (E-mail)
> Subject: why does Torque select all the data of an object prior to a
save
> ( update )
>
> 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
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org