ObjectDB ObjectDB

String representation of a query



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 :


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.


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

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Thank you, works perfectly.

Post Reply