persistence@glassfish.java.net

RE: How to display Toplink's generated query?

From: Peter Krogh <peter.krogh_at_oracle.com>
Date: Fri, 7 Mar 2008 09:57:33 -0500

You can increase the logging level using the toplink.logging.level property:

eg, add this to your persistence.xml file:

<property name="toplink.logging.level" value="FINEST" />




-----Original Message-----
From: gcsaba2 [mailto:gcsaba2_at_freemail.hu]
Sent: Friday, March 07, 2008 9:49 AM
To: persistence_at_glassfish.dev.java.net
Subject: How to display Toplink's generated query?



Is there a way I can see what query TopLink generates? For example, if I
write "from Post", then it probably generates something like "select p.id,
p.name, p.date from Post p"
You can see this kind of message when there's an error in the SQL query, for
example when a foreign key is violated, but I'd like to display it at all
time. In Hibernate this can be done by simply setting the debug level to
DEBUG.
In TopLink I have the debug level set to FINEST, but it doesn't print the
queries.
--
View this message in context: http://www.nabble.com/How-to-display-Toplink%27s-generated-query--tp15892878p15892878.html
Sent from the java.net - glassfish persistence mailing list archive at Nabble.com.