Skip to content

Commit

Permalink
refactor: 번역 결과 저장 엔티티(TranslatedTodoEntity) 생성자에서 id -> todoId로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
tlarbals824 committed Aug 7, 2024
1 parent 9494cf5 commit ac35cdf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import jakarta.persistence.Table
@Entity
@Table(name = "translated_todo")
class TranslatedTodoEntity(
id: Long, // todo id
todoId: Long, // todo id
language: Language,
description: String,
) {

@EmbeddedId
val id: MultiLanguageId = MultiLanguageId(id, language)
val id: MultiLanguageId = MultiLanguageId(todoId, language)

@Column(
nullable = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TodoTranslateHandler(
translatedDescription.forEach { (language, text) ->
translatedTodoJpaRepository.save(
TranslatedTodoEntity(
id = todo.id,
todoId = todo.id,
language = language,
description = text
)
Expand Down

0 comments on commit ac35cdf

Please sign in to comment.