Open
Conversation
jjunhub
reviewed
Oct 19, 2024
Comment on lines
+12
to
+13
| @Getter | ||
| public class Grades { |
jjunhub
reviewed
Oct 19, 2024
|
|
||
| import org.springframework.data.jpa.repository.JpaRepository; | ||
|
|
||
| public interface GradesRepository extends JpaRepository { |
Member
There was a problem hiding this comment.
Suggested change
| public interface GradesRepository extends JpaRepository { | |
| public interface GradesRepository extends JpaRepository<Grades, Long> { |
JpaRepository를 사용하실 떄는 제네릭 부분에 <Entity 클래스 명, PK의 타입> 형태로 작성해주셔야합니다!
jjunhub
reviewed
Oct 19, 2024
Comment on lines
+15
to
+16
| @Id | ||
| private int studentId; |
Member
There was a problem hiding this comment.
학생 학번이라 의도적으로 @GeneratedValue를 사용하지 않고, 직접 PK를 작성하도록 구현한 디테일 너무 좋습니다!
jjunhub
reviewed
Oct 19, 2024
Member
jjunhub
left a comment
There was a problem hiding this comment.
Student 엔티티 관련해서 의도적으로 자동 값을 PK로 설정하지 않은 점 인상 깊었습니다!
추가적으로 해당 엔티티에 대해서 정상적으로 동작하는 지 테스트 코드도 함께되면 더 좋을 것 같습니다. 수고하셧습니다~
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.
사실 M:N이라 학생 - 과목 - 성적으로 쪼개야 할 것 같은데 일단 대충 만들었읍니다
EntityManagerFactory 써서 뭐 하려다가 잘 안됐는데 그것에 대해서는... 더 고민해 보는 것으로...