configure hibernate and gen entity