entityManager.persist(student);
}
@Override
public Student update(Integer id, Student student){
Student oldStudent = findById(id);
oldStudent.setAddress(student.getAddress());
oldStudent.setAge(student.getAge());
oldStudent.setBirthDate(student.getBirthDate());
oldStudent.setFirstName(student.getFirstName());
oldStudent.setLastName(student.getLastName());
oldStudent.setSex(student.getSex());
return entityManager.merge(oldStudent);
}