changed hibernate version to the last fully working one and updated templates and files so as to support cascade deleting