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 Sathish Amba <sa...@kryptiq.com> on 2008/10/30 22:50:11 UTC

How to Update multiple rows

Hi all,

 

I want to update multiple rows based on a given condition.

 

Is there a way to do it in torque?

 

Thanks

Sathish


RE: How to Update multiple rows

Posted by Thomas Fischer <fi...@seitenbau.net>.
> I want to update multiple rows based on a given condition.
> 
> Is there a way to do it in torque?

In principle, there should be a way to do it _with_ torque. Torque has no 
built-in trigger mechanism, except that one can intercept saves and 
selects on tables which are acessed by torque.

The exact implementation depends on what the condition is...

     Thomas

RE: How to Update multiple rows

Posted by Sathish Amba <sa...@kryptiq.com>.
Oh yeah. It is in BasePeer.

Thanks Thomas.

-Sathish

-----Original Message-----
From: Thomas Vandahl [mailto:tv@apache.org] 
Sent: Friday, October 31, 2008 10:15 AM
To: Apache Torque Users List
Subject: Re: How to Update multiple rows

Sathish Amba wrote:
> I want to update multiple rows based on a given condition.
> Is there a way to do it in torque?

See YourPeer.doUpdate(Criteria update, Criteria condition).

Bye, Thomas.

---------------------------------------------------------------------
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


Re: How to Update multiple rows

Posted by Thomas Vandahl <tv...@apache.org>.
Sathish Amba wrote:
> I want to update multiple rows based on a given condition.
> Is there a way to do it in torque?

See YourPeer.doUpdate(Criteria update, Criteria condition).

Bye, Thomas.

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