Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JDBC 라이브러리 구현하기 - 3, 4단계] 로건(정다빈) 미션 제출합니다. #595
[JDBC 라이브러리 구현하기 - 3, 4단계] 로건(정다빈) 미션 제출합니다. #595
Changes from all commits
5b7bbd5
0651ed5
a5591b3
d5f4e22
e92467e
d5726e2
a2dc6e4
b7241df
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
해당 메서드는 트랜잭션을 사용하지 않은 이유가 있을까요 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
팀플처럼 JPA를 사용한다면
@Transactional(readOnly=true)
를 적용 했을텐데, 현재 트랜잭션 기능은 읽기 모드가 없으니 데이터를 수정해도 예외가 발생하지 않아서 아예 트랜잭션을 걸어주지 않았어요하디는 어떻게 생각하시나요??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
단순히
userDao
의findById
만 호출하니 상관없을 것 같긴한것같아요하지만 조회로직이여도, 예를들어
findById
를 호출 하고, 다른 곳에서User
에 대한 정보를 수정한다음 다시findById
를 호출 하였을 때, 즉 로직하나에서findById
를 두 번 호출하였을 때 조회결과가 달라질 수도 있을 것같아요.이런 부분을 막고자 격리수준을 설정해주기 위해서 트랜잭션으로 묶여야 된다는게 제 생각입니다 ! (물론 현재는 격리수준에 대한 내용은 없지만요 !)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아하 동시에
findById
와User를 수정하고, 다시 User를 조회하는 로직
이 같이 실행될 때 말하시는거군요??그런 경우를 생각하면 하디 말이 맞는 것 같아요