auto scale
add hibernate code