hibernate example corrected