entityManager.persist(lecture);
}
@Override
public Lecture update(Integer id, Lecture lecture) {
Lecture oldLecture = findById(id);
oldLecture.setSemester(lecture.getSemester());
oldLecture.setSubject(lecture.getSubject());
oldLecture.setTeacher(lecture.getTeacher());
oldLecture.setYear(lecture.getYear());
return entityManager.merge(oldLecture);
}