diff --git a/src/main/java/com/plzgraduate/myongjigraduatebe/lecture/adapter/out/persistence/LectureMapper.java b/src/main/java/com/plzgraduate/myongjigraduatebe/lecture/adapter/out/persistence/LectureMapper.java index c8491470..8de57768 100644 --- a/src/main/java/com/plzgraduate/myongjigraduatebe/lecture/adapter/out/persistence/LectureMapper.java +++ b/src/main/java/com/plzgraduate/myongjigraduatebe/lecture/adapter/out/persistence/LectureMapper.java @@ -19,6 +19,7 @@ public class LectureMapper { Lecture mapToLectureDomainEntity(LectureJpaEntity lecture) { return Lecture.builder() + .id(lecture.getId()) .lectureCode(lecture.getLectureCode()) .name(lecture.getName()) .credit(lecture.getCredit()) diff --git a/src/test/java/com/plzgraduate/myongjigraduatebe/takenlecture/adaptor/out/persistence/TakenLectureRepositoryTest.java b/src/test/java/com/plzgraduate/myongjigraduatebe/takenlecture/adaptor/out/persistence/TakenLectureRepositoryTest.java index aa3f23b7..26431de7 100644 --- a/src/test/java/com/plzgraduate/myongjigraduatebe/takenlecture/adaptor/out/persistence/TakenLectureRepositoryTest.java +++ b/src/test/java/com/plzgraduate/myongjigraduatebe/takenlecture/adaptor/out/persistence/TakenLectureRepositoryTest.java @@ -33,7 +33,8 @@ void findByUser() { .studentNumber("60191656").build(); userRepository.save(user); - LectureJpaEntity lecture = LectureJpaEntity.builder().build(); + LectureJpaEntity lecture = LectureJpaEntity.builder() + .lectureCode("KMA02105").build(); lectureRepository.save(lecture); TakenLectureJpaEntity takenLectureA = TakenLectureJpaEntity.builder()