Conversation
Test Results18 tests - 14 13 ✅ - 19 5s ⏱️ -2s For more details on these failures, see this check. Results for commit 5d74eb8. ± Comparison against base commit c7f09d8. This pull request removes 14 tests.♻️ This comment has been updated with latest results. |
| @Entity | ||
| @Getter | ||
| @Builder | ||
| @AllArgsConstructor |
| default HistoryListResV2 findHistoryListByMember(Member member){ | ||
| List<History> res = findHistoriesByMember(member); | ||
| return HistoryListResV2.of(res); | ||
| } |
There was a problem hiding this comment.
Exception 처리를 해주지 않는데, default로 선언하고 여기서 List에 값을 넣는 작업까지 해주는 이유가 있나요?
한번에 List<History> res = findHistoriesByMember(member) 로 해주면 안되나요
There was a problem hiding this comment.
서비스계층은 어떤 작업을 할건지 흐름이 보이는 것만 했으면 좋겠는데 엔티티를 가져와서 dto로 만드는 과정이 거기 들어가는 것보다 레포단에서 해주고 넘겨야한다고 생각해서 한 번 더 감싸서 dto로 리턴해줬습니다.
| public interface PointRepository extends JpaRepository<Point, Long> { | ||
|
|
||
| @Query("SELECT p FROM Point p WHERE p.member = :member") | ||
| Optional<Point> findByMember(@Param("member") Member member); |
| import org.springframework.transaction.annotation.Transactional; | ||
|
|
||
| @Service | ||
| @Transactional |
There was a problem hiding this comment.
Transactional이 Service 위에 있는 이유가 있나요?
Get의 경우 @Transactional(readonly)로 해두는게 성능상 좋다고 해서 그렇게 사용하고 있었는데, 위와 같이 코딩한(?) 이유가 궁금합니다
#️⃣연관된 이슈
📝작업 내용
#221