Database clean up #134
janeljs
started this conversation in
New Feature
Replies: 2 comments
-
2안이랑 똑같이 해도 좋을 것 같네요 |
Beta Was this translation helpful? Give feedback.
0 replies
-
@PostConstruct
public void init() {
tableNames = entityManager.getMetamodel().getEntities().stream()
.filter(e -> e.getJavaType().getAnnotation(Entity.class) != null)
.map(e -> CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, e.getName()))
.collect(Collectors.toList());
}
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
데이터베이스 초기화 방법에 대해 논의해봅시다.
1안
deleteAll() 메서드로 지운다.
2안
AcceptanceTestBase에 아래 부분을 추가한다.
출처: https://github.com/next-step/atdd-subway-admin/blob/jeongminkyo/src/test/java/nextstep/subway/utils/DatabaseCleanup.java
Beta Was this translation helpful? Give feedback.
All reactions