Return-Path: Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 67741 invoked from network); 13 Feb 2003 06:03:00 -0000 Received: from relais.videotron.ca (HELO VL-MS-MR001.sc1.videotron.ca) (24.201.245.36) by daedalus.apache.org with SMTP; 13 Feb 2003 06:03:00 -0000 Received: from videotron.ca ([66.131.32.226]) by VL-MS-MR001.sc1.videotron.ca (iPlanet Messaging Server 5.2 HotFix 1.10 (built Jan 23 2003)) with ESMTP id <0HA800MKOGTQYF@VL-MS-MR001.sc1.videotron.ca> for torque-user@db.apache.org; Thu, 13 Feb 2003 01:03:26 -0500 (EST) Date: Thu, 13 Feb 2003 00:56:31 -0500 From: Jean-Marc Lavoie Subject: Re: Cann't use criteria two times. To: Turbine Torque Users List Message-id: <3E4B338F.4090906@videotron.ca> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3 References: <1BD922A62552D411B48A00D0B7472375154C3F21@kecmsg04.ad.infosys.com> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N The Criteria object is modified so the BasePeer can add some Cirteria of is's own, like the field requested by the object. It look like it mix up the BasePeer to reuse it. There was some discussion on that some weeks ago. Simply create a new one, that make some line of code more, but it will work. Good luck Vinod_Thapliyal wrote: > Hi all, > >I have created a criteria to query on one of my table. It involves join on tables. The first time I query on a table the results are returned. But, next time when I try to use the same criteria on the other table. It retunrs me an error. I tried a query on the second table by commenting the query for first table then I get the results. But, the two queries don't work together. > >The criteria is: > >criteria.addJoin(TurbineProjectsPeer.GROUP_ID,TurbineUserGroupRolePeer.GROUP_ID); > > criteria.addJoin(TurbineUserGroupRolePeer.GROUP_ID,TurbineGroupPeer.GROUP_ID); > > criteria.addJoin(TurbineUserGroupRolePeer.USER_ID,TurbineUserPeer.USER_ID); > > > > criteria.add(TurbineUserGroupRolePeer.ROLE_ID,10); > > > Iterator = Projects; > > > >Projects = TurbineProjectsPeer.doSelect(criteria).iterator(); > > > > Projects = TurbineUserGroupRolePeer.doSelect(criteria).iterator(); > >I get the following error: > >Error: org.apache.torqueException: Bad Conversion: java.lang.numberformatexception: silent > > >Any clue why its behaving like this? > >vinod > >--------------------------------------------------------------------- >To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org >For additional commands, e-mail: torque-user-help@db.apache.org > >