Code changes for hibernate.