openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <plins...@gmail.com>
Subject Re: native sql
Date Fri, 14 Sep 2007 01:26:46 GMT
Can you post the XCAP class source as well?

Generally-speaking, a select should not always be necessary.

-Patrick

On 9/13/07, dboudigue <didier.boudigue@alcatel-lucent.fr> 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 - <t 7438914, conn 2016650>
> 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 - <t 7438914, conn 2016650> [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

Mime
View raw message