🚀 4단계 - EntityEntry - #257
Open
sang5c wants to merge 2 commits into
Open
Conversation
wooobo
requested changes
Nov 21, 2024
wooobo
left a comment
There was a problem hiding this comment.
안녕하세요 상오님~
4단계 까지 잘오셨습니다 🤙
코멘트남겨 놓았는데 도움이 되었으면 좋겠네요~
그럼 화이팅입니다!
| @@ -0,0 +1,17 @@ | |||
| package persistence.entity; | |||
|
|
|||
| public class EntityEntry { | |||
There was a problem hiding this comment.
JPA가 돌아가는 어플리케이션 세계 와 실제 DB 세계 는 다른곳에 있죠?
이러한 다른 두개의 세계를 Entity 객체라는 개념을 통해 안전하고 효율적으로 관리해주어야합니다.
그럼, JPA의 Entity(어플리케이션)을 DB로 동기화 하는데 시간이 걸릴수도 있을것 같습니다. 그럼 우리는 대기해야하고 Entity에 대한 접근을 제안하여 온전한 동기화 과정을 이루어지게 해야 할 듯합니다.
There was a problem hiding this comment.
- EntityEntry는 각 엔티티의 상태를 추적하는 데 사용
- 영속화된 Entity의 상태를 가지므로써
MANAGED → DELETED는 허용되지만MANAGED → GONE은 허용하지 않을 수 있음.GONE -> MANAGED허용할 수 없음- 이유가 뭘까요?
There was a problem hiding this comment.
그렇다면, EntityEntry는 Entity마다 상태를 관리해주면 좋을것 같습니다. EntityEntry가 Entity의 식별자를 가지고 있어야하는 이유가 될수 있겠네요.
개인적인 생각으론 EntityEntry 는 어떤환경으로 구축방향을 잡느냐에 따라 다르다고 생각해요~ 코멘트는 참고 정도로 봐주세요~
모든 상태를 다 적용하실 필요는 없다고 생각합니다. 중요한것은 상오님만의 생각으로 개념을이해하는것입니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
안녕하세요 리뷰어님!
어떤 방향으로 미션을 수행하며 풀어나가야 할지 몰라 힌트를 얻고자 일단 PR을 올려봅니다..!
EntityEntry가 언제 어떻게 쓰여야 좋을지 잘 모르겠습니다.
현재 상태에서 어떤 부분을 고민하면서 구현하면 좋을지 힌트 부탁드립니다 🙏