Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 54613 invoked from network); 21 May 2010 17:53:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 May 2010 17:53:51 -0000 Received: (qmail 51198 invoked by uid 500); 21 May 2010 17:53:51 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 51120 invoked by uid 500); 21 May 2010 17:53:50 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: 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 51111 invoked by uid 99); 21 May 2010 17:53:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 May 2010 17:53:50 +0000 X-ASF-Spam-Status: No, hits=4.4 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of weizhao6898@gmail.com designates 209.85.214.172 as permitted sender) Received: from [209.85.214.172] (HELO mail-iw0-f172.google.com) (209.85.214.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 May 2010 17:53:42 +0000 Received: by iwn42 with SMTP id 42so1461727iwn.31 for ; Fri, 21 May 2010 10:53:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:content-type; bh=Vn3o33qKMB4KZ/1qR6o9iV8Q3mqJoCkF3qTBvPVfGC0=; b=x584lilLUHStFp+ZDG07b65iZpFGdNyFrcCc2KrEd131jfRqG70QhRDpcyZuAgED3R zj1LHVaSra6e7ZuxpNddJ1eaWficnfYVCcgg2Z3PLGWmywgTQyGmirMQosklUsLzr5aw RcxsZS0GMLdRcain0Ox5s3kvmyItt2e5WOSBY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; b=DH3NtAIh6qtj95x81WJVQ1q0kb9tes7/SwP+0u4pTGVhrf6BXNhO+YW/ONf7DyrZqJ r7AMF/UIf1RBVnFdFNXkQqTlqHq97lDzXEveG0oNIkSGKUln52o/wKt2v++53abzvP51 2nmDMbHR0RnHUprJImY4HjigZFsakQg2AdeHs= Received: by 10.231.125.158 with SMTP id y30mr1390990ibr.99.1274464401410; Fri, 21 May 2010 10:53:21 -0700 (PDT) MIME-Version: 1.0 Sender: weizhao6898@gmail.com Received: by 10.231.12.9 with HTTP; Fri, 21 May 2010 10:52:59 -0700 (PDT) In-Reply-To: <4BE8663A.5070006@apache.org> References: <4BE2E2AB.7080403@apache.org> <4BE8663A.5070006@apache.org> From: "wzhao6898@gmail.com" Date: Fri, 21 May 2010 10:52:59 -0700 X-Google-Sender-Auth: rVruq37wS-WekiEQVMJjnv1EClk Message-ID: Subject: Re: How to strip off selected columns from a criteria object To: Apache Torque Users List Content-Type: multipart/alternative; boundary=0016e64b906eecca4404871e5d05 X-Virus-Checked: Checked by ClamAV on apache.org --0016e64b906eecca4404871e5d05 Content-Type: text/plain; charset=ISO-8859-1 Hi Thomas, Thanks a lot, just tried this, worked like a charm. BTW, Criteria object returned by criteria.clone() gets affected if the original criteria object is modified. Is this a bug? For examples, if I have an existing criteria, then I do: Criteria criteriaClone = criteria.clone(); criteria.getSelectColumns().clean(); both criteria and criteriaClone have empty selectcolumn list. Thanks, David On Mon, May 10, 2010 at 1:02 PM, Thomas Vandahl wrote: > Hi Dave, > > wzhao6898@gmail.com schrieb: > > Thanks for your reply. But what I need to deal with is that: >> I have a criteria object, with joins, and where clauses and a list of >> columns to select, and I need to remove all the selected columns in the >> criteria, both selected column, and as columns, so I can use OMPeer class >> to >> select a list of OM objects; >> > > What happens if you do criteria.getSelectColumns().clear() or > criteria.getAsColumns().clear(), respectively? Would that help? > (This is what is basically done in criteria.clear(), among other things) > > > Bye, Thomas. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > For additional commands, e-mail: torque-user-help@db.apache.org > > --0016e64b906eecca4404871e5d05--