based on hibernate 4.3.1