vect
vect

Reputation: 665

How to get a query from criteria?

I'm using Seam 2.2.0.GA with JPA 1.2 provided by Hibernate 3.3. Is there a way to obtain an object of either org.hibernate.Query or javax.persistence.Query class out of a org.hibernate.Criteria query? Have the Criteria query as a EjbQL query string would also be acceptable for me.

Upvotes: 3

Views: 411

Answers (1)

JB Nizet
JB Nizet

Reputation: 692121

No, it's not possible. Criteria queries are translated to SQL directly, without going through an intermediate JPQL/HQL query.

Upvotes: 2

Related Questions