Skip to content

Commit

Permalink
Merge pull request #138 from themoment-team/fix/commentUserCascade
Browse files Browse the repository at this point in the history
댓글, 유저 cascade ALL 추가
  • Loading branch information
tlsgmltjd committed Apr 15, 2024
2 parents f4e9994 + 5852f41 commit 3f10b53
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package team.themoment.gsmNetworking.domain.user.domain

import team.themoment.gsmNetworking.common.domain.BaseIdTimestampEntity
import team.themoment.gsmNetworking.domain.board.domain.Board
import team.themoment.gsmNetworking.domain.comment.domain.Comment
import team.themoment.gsmNetworking.domain.mentor.domain.Mentor
import team.themoment.gsmNetworking.domain.user.converter.EncryptConverter
import javax.persistence.*
Expand Down Expand Up @@ -41,7 +42,10 @@ class User(
var defaultImgNumber: Int = 0,

@OneToMany(mappedBy = "author", cascade = [CascadeType.ALL], orphanRemoval = true)
val boards: MutableList<Board> = ArrayList()
val boards: MutableList<Board> = ArrayList(),

@OneToMany(mappedBy = "author", cascade = [CascadeType.ALL], orphanRemoval = true)
val comments: MutableList<Comment> = ArrayList()

) : BaseIdTimestampEntity() {

Expand Down

0 comments on commit 3f10b53

Please sign in to comment.