String representation of a query

#1

Hi,

Is it possible to get a JPQL string having a Query object instance? JpaQuery class doesn't have any method like "getQueryString" or "getDatabaseQuery", maybe it's going to be added in near future? It would be very useful to have something similiar to :

queryObject.unwrap(com.objectdb.jpa.JpaQuery.class).getQueryString()

I would like to measure time of query execution and log that information with JPQL string and parameters map to find and optimize the most ineffective cases.

#2

Following your request a toString implementation that returns the query string was added to queries.

ObjectDB Support
#3

Thank you, works perfectly.

Reply