Hello,
I have the same problem.
See class org.hibernate.loader.Loader.java
Code:
/**
* Identifies the query for statistics reporting, if null,
* no statistics will be reported
*/
protected String getQueryIdentifier() {
return null;
}
This method is invoked.
Replace the line:
Code:
return null;
with
Code:
getSQLString();
.
I am testing just now this workaround. The solution has effects to the Statistics API regarding query cache.
Let me know if you get an alternate solution or if you have problems with the workaround.
mba