aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes output EJB query in entity class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "output EJB query in entity class" Watch "output EJB query in entity class" New topic
Author

output EJB query in entity class

K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2524
    
    8

Hello Does anyone know how to print the actual SQL query generated by EJBQL?

Suppose I have query = em.createNamedQuery("bla"); then setParameter for where clause. I can't just System.out.println(query); = this would give the object in string form.

Given bla is like "select a from Account a where a.email=:email and ...";
How to print to give the select format?

Thanks


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5 OCPBCD5
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: output EJB query in entity class