-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Feature] 리뷰 생성하기 #17
Conversation
related to: #16
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.
수고하셨습니다
questionWithOptions.options()); | ||
|
||
Question question = Question.builder() | ||
.id(questionIdCounter.getAndIncrement()) |
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.
batch insert를 활용하려면 pk값을 따로 관리해줘야하나보네요?!
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.
앗 이전 DB 구조 상으로는 option 삽입할 때 question 아이디 값이 필요한데, JDBC로 하면 삽입된 question의 id 값을 바로 받아올 수 없어서.. 저렇게 따로 관리했었어요.
근데 지금 DB 상으로는 question id를 따로 관리할 필요 없겠네요..! 수정하겠습니다
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.
아핳 네넵!
private List<ReviewFormQuestion> reviewFormQuestions; | ||
@Column(columnDefinition = "json") | ||
@JdbcTypeCode(SqlTypes.JSON) | ||
// @Convert(converter = ListConverter.class) |
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.
요 converter는 사용하지 않으면 지워도 될 것 같아요
import java.util.List; | ||
|
||
@Converter | ||
public class OptionListConverter implements AttributeConverter<List<Option>, String> { |
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.
이렇게 따로 converter를 지정할 수도 있군요
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.
안 만들어주면 오류가 나더군요😂
private final QuestionRepository questionRepository; | ||
|
||
public QuestionGetResponse getQuestionsInCategories(QuestionGetRequest request, String memberId) { | ||
Member member = memberRepository.findByProviderId(memberId) |
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.
이 member는 사용안하는 것 같아요!
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.
수고하셨습니다
괜찮은 것 같아요!
아뇨 없습니다~! |
앗 이 부분은 아직 만들지 않았지만.. 나중에 ReviewRecord라는 테이블을 보시면 될 것 같습니다. |
hashcode, equals 재정의 related to: #16
related to: #16
related to: #16
…d-side-project/dnd-11th-9-backend into feature/#16-create-reviewform
✏️ Description
🙏🏻 To Reviewers
💡 Issue Number