Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

odrotbohm/hibernate-criteria-statistics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Enabling Hibernate criteria statistics with AspectJ
---------------------------------------------------

Currently Hibernate statistics does not include information about
criteria queries. According to this ticket [1] all it needs to make
this work is add a method 

protected String getQueryIdentifier() { 
  return "[CRITERIA] " + getSQLString();
}

to CriteriaLoader class. As patching Hibernate itself would be rather
tedious, this projects contains an AspectJ aspect to add the method
via an inter-type declaration as well as a test to demonstrate it.

[1] - http://opensource.atlassian.com/projects/hibernate/browse/HHH-3452

About

Sample projects on how to enable Criteria statistics in Hibernate with AspectJ until HHH-3452 gets fixed

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages