setting the config for hibernate and can save entity into database.