users@glassfish.java.net

Re: Where are the SQL statements generated of the NamedQueries stored?

From: <glassfish_at_javadesktop.org>
Date: Thu, 15 May 2008 12:12:31 PDT

One option is to get hold of Toplink em. That is as follows

EntityManager toplinkEm = em.getDelegate();
((oracle.toplink.essentials.ejb.cmp3.EJBQuery)[b]toplinkEm[/b].createNamedQuery("name")).getDatabaseQuery();
 dbQuery.prepareCall(((EntityManagerImpl)em.getDelegate ()).getServerSession(), new DatabaseRecord());
[Message sent by forum member 'mm110999' (mm110999)]

http://forums.java.net/jive/thread.jspa?messageID=274665