Skip to content
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

게시글 선택지 투표기능, 투표 수정기능 구현 #47

Merged
merged 16 commits into from
Jul 18, 2023
Merged
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.votogether.domain.vote.repository;

import com.votogether.domain.vote.entity.Vote;
import org.springframework.data.jpa.repository.JpaRepository;

public interface VoteRepository extends JpaRepository<Vote, Long> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 : Vote 레포지토리가 필요한 이유가 궁금합니다. 투표를 하는 주체가 Member이고, Member와 생명주기가 동일할 것 같은데 연관관계 편의 메서드를 활용해보는 방법은 어떨까요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

연관관계 편의 메서드를 활용한다는것이 Member.votes를 연관관계 주인으로 해서 Vote레파지토리가 필요없이
Memeber레파지토리를 통해서 vote의 데이터값이 저정하게끔한다는 말씀이신가요??

}