Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 95971 invoked from network); 23 Mar 2004 15:10:36 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 23 Mar 2004 15:10:36 -0000 Received: (qmail 15094 invoked by uid 500); 23 Mar 2004 15:10:26 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 15084 invoked by uid 500); 23 Mar 2004 15:10:26 -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 15071 invoked from network); 23 Mar 2004 15:10:26 -0000 Received: from unknown (HELO hotmail.com) (64.4.49.38) by daedalus.apache.org with SMTP; 23 Mar 2004 15:10:26 -0000 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 23 Mar 2004 07:10:28 -0800 Received: from 61.11.78.116 by by14fd.bay14.hotmail.msn.com with HTTP; Tue, 23 Mar 2004 15:10:28 GMT X-Originating-IP: [61.11.78.116] X-Originating-Email: [newtonmn@hotmail.com] X-Sender: newtonmn@hotmail.com From: "newton mn" To: torque-user@db.apache.org Bcc: Subject: Re: Doubt in Torque Update Date: Tue, 23 Mar 2004 20:40:28 +0530 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 23 Mar 2004 15:10:28.0964 (UTC) FILETIME=[FA37E240:01C410E8] 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 hi Andras I solved my problem, thanks your kind response. Criteria us2 = new Criteria(); us2.add(UsercontentratingPeer.USERID,uid); us2.add(UsercontentratingPeer.CONTENTITEMID,item_id); List vv=UsercontentratingPeer.doSelect(us2,connection); Iterator ii=vv.iterator(); Usercontentrating use=new Usercontentrating(); if(ii.hasNext()) { use=(Usercontentrating)ii.next(); } use.setRating(ratin); use.setTs(ts); UsercontentratingPeer.doUpdate(use,connection); use.save(); Thanks Newton. >From: Andras Balogh >Reply-To: "Apache Torque Users List" >To: Apache Torque Users List >Subject: Re: Doubt in Torque Update >Date: Mon, 22 Mar 2004 17:03:31 +0200 > >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 > _________________________________________________________________ Post Classifieds on MSN classifieds. http://go.msnserver.com/IN/44045.asp Buy and Sell on MSN Classifieds. --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org