set save and delete function in entities