users@jpa-spec.java.net

[jpa-spec users] How to get the JPQL/SQL String From a CriteriaQuery in JPA ?

From: <antonio.goncalves_at_gmail.com>
Date: Fri, 25 May 2012 09:08:42 +0000 (GMT)

Hi all,

Recently I had to debug a complex CriteriaQuery and found it very
useful to be able to have the SQL representation. Because this is not
specified, I wrote a blog about "how to get the query String with
Hibernate, OpenJPA ans EclipseLink" :
http://agoncal.wordpress.com/2012/05/24/how-to-get-the-jpqlsql-string-f
rom-a-criteriaquery-in-jpa/

This feature is very useful for developers and I think it would be good
to specify it.

Christian Beikov has created a JIRA :
http://java.net/jira/browse/JPA_SPEC-25. Hoping to read your comments
on that.

Thank you,
Antonio