Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

output EJB query in entity class  RSS feed

 
K. Tsang
Bartender
Posts: 3624
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!