Return-Path: Delivered-To: apmail-openjpa-users-archive@locus.apache.org Received: (qmail 13779 invoked from network); 14 Sep 2007 01:27:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Sep 2007 01:27:16 -0000 Received: (qmail 16050 invoked by uid 500); 14 Sep 2007 01:27:09 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 16024 invoked by uid 500); 14 Sep 2007 01:27:09 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 16015 invoked by uid 99); 14 Sep 2007 01:27:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Sep 2007 18:27:09 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of plinskey@gmail.com designates 209.85.198.189 as permitted sender) Received: from [209.85.198.189] (HELO rv-out-0910.google.com) (209.85.198.189) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Sep 2007 01:27:06 +0000 Received: by rv-out-0910.google.com with SMTP id k20so606269rvb for ; Thu, 13 Sep 2007 18:26:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=ewCl0T4DQvPdqk8lTksixJNjId4XNlsGgetmeyuzgf0=; b=XFuzs1smQduQ2NzujsfVkTzh4uXjrki0CDE8dF0U1A2E4Ul07WXQTcY6szg2H4N+3lDvvmW3EES2iXTlWdBbJQwWlLGZdCX0e4xDqVbZ+oXd2RxBGmHiqIlwLRs5i0xwe/Ab8LrBOiIXtrbSP64/M2cW3Z2JA97RzUmacAhxGBY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=FIl71Z9K5ehV702Z8M0iSd5dN1EuXthh9Z+5NLg6OZSD0hOaND9Hq3f8n3NrN/30TIuJJJ25NI2kYdrPTt7NZTmqNwoOnwtfVZc9zsZAYpfVaIiuG66nmWjvYReipajw8AhCPkOng2hPSXM/yI+bF6zsRTJoM59bzaBTLFz+8Bg= Received: by 10.142.229.4 with SMTP id b4mr307583wfh.1189733206309; Thu, 13 Sep 2007 18:26:46 -0700 (PDT) Received: by 10.143.16.2 with HTTP; Thu, 13 Sep 2007 18:26:46 -0700 (PDT) Message-ID: <7262f25e0709131826s660137ddt38e58b3c318b4ccf@mail.gmail.com> Date: Thu, 13 Sep 2007 18:26:46 -0700 From: "Patrick Linskey" To: users@openjpa.apache.org Subject: Re: native sql In-Reply-To: <12650013.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <12632752.post@talk.nabble.com> <7262f25e0709120915x685cfe7dyeecdb332ea2db062@mail.gmail.com> <12649366.post@talk.nabble.com> <7262f25e0709122338g223f14fai86c4fb72a2d98645@mail.gmail.com> <12650013.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Can you post the XCAP class source as well? Generally-speaking, a select should not always be necessary. -Patrick On 9/13/07, dboudigue wrote: > > Patrick, here are the code and traces. > Anyway, an option to skip select in jpl delete or update that would be a > nice feature. > > Didier > > .... > > EntityManagerFactory factory = > Persistence.createEntityManagerFactory("xcap", props); > EntityManager em = factory.createEntityManager(); > em.getTransaction().begin(); > Query delete = em.createQuery("delete from XCAP x where x.user = :user and > x.file = :file and x.auid = :auid"); > delete.setParameter("user", user); > delete.setParameter("file", file); > delete.setParameter("auid", auid); > int deleted = delete.executeUpdate(); > em.close(); > factory.close(); > > > ..... > > 36 xcap INFO [main] openjpa.Runtime - Starting OpenJPA 1.0.0 > 159 xcap INFO [main] openjpa.jdbc.JDBC - Using dictionary class > "org.apache.openjpa.jdbc.sql.MySQLDictionary". > 329 xcap INFO [main] openjpa.Enhance - Creating subclass and redefining > methods for "[class com.alcatel_lucent.jpa.entity.XCap]". This means that > your application will be less efficient than it would if you ran the OpenJPA > enhancer. > 2017 xcap TRACE [main] openjpa.jdbc.SQL - > executing prepstmnt 21006994 SELECT t0.auid, t0.FILENM, t0.USERNM, > t0.CONTENT_TYPE, t0.DOC, t0.DOC_SZ, t0.etag, t0.MODIFIED_DATE FROM XCAP t0 > WHERE (t0.USERNM = ? AND t0.FILENM = ? AND t0.auid = ?) [params=(String) > didier1, (String) index1, (String) auid1] > 2051 xcap TRACE [main] openjpa.jdbc.SQL - [33 > ms] spent > > > > -- > View this message in context: http://www.nabble.com/native-sql-tf4428366.html#a12650013 > Sent from the OpenJPA Users mailing list archive at Nabble.com. > > -- Patrick Linskey 202 669 5907