Old version of hibernate based on 3.5 changed to add query stats. Hopefully we can get rid of.