Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 59834 invoked from network); 22 Mar 2004 15:04:43 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 22 Mar 2004 15:04:43 -0000 Received: (qmail 93136 invoked by uid 500); 22 Mar 2004 15:03:22 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 93080 invoked by uid 500); 22 Mar 2004 15:03:22 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 92971 invoked from network); 22 Mar 2004 15:03:21 -0000 Received: from unknown (HELO gw.reea.net) (193.230.173.18) by daedalus.apache.org with SMTP; 22 Mar 2004 15:03:21 -0000 Received: from reea.net (andras.ms.reea.net [192.168.0.2]) by gw.reea.net (8.12.8/8.12.8) with ESMTP id i2MF3MTJ016260 for ; Mon, 22 Mar 2004 17:03:22 +0200 Message-ID: <405F0043.7030301@reea.net> Date: Mon, 22 Mar 2004 17:03:31 +0200 From: Andras Balogh User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Apache Torque Users List Subject: Re: Doubt in Torque Update References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hello, I think you have to create 2 Criteria objects and use this method: BasePeer.doUpdate(selectCriteria, criteria, con); Best wishes, Andras newton mn wrote: > hi > >> "update UserContentRating set Rating="+rating+ " ,ts='"+ts+"'"+" where >> ContentItemId="+item_id+" and UserId='"+uid+"'"; >> >> The above query, i want to change to Torque , I did below like >> >> Criteria us2 = new Criteria(); >> us2.add(UsercontentratingPeer.RATING,rating); >> us2.add(UsercontentratingPeer.TS,ts); >> Criteria.Criterion cri = >> us2.getNewCriterion(UsercontentratingPeer.USERID, >> uid, Criteria.EQUAL); >> Criteria.Criterion cri1 = >> us2.getNewCriterion(UsercontentratingPeer.CONTENTITEMID,new >> Integer(item_id),Criteria.EQUAL); >> us2.add(cri.and(cri1)); >> UsercontentratingPeer.doUpdate(us2,connection); >> >> In that condition valuesis not Updated what i given condition >> properly. How can I check the condition in Torque?. any one please >> help me as soon as possible. > > Thanks > Newton > >> > > _________________________________________________________________ > Join BharatMatrimony.com. > http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?72 Unmarried? > Join Free. > > > --------------------------------------------------------------------- > 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