Skip to content

Commit

Permalink
delete :: cascade
Browse files Browse the repository at this point in the history
  • Loading branch information
meltapplee committed Sep 16, 2024
1 parent 6f0d2ca commit 7984dd1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/kotlin/org/meogo/domain/comment/domain/Comment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package org.meogo.domain.comment.domain
import org.meogo.domain.post.domain.Post
import org.meogo.domain.user.domain.User
import java.time.LocalDateTime
import javax.persistence.CascadeType.REMOVE
import javax.persistence.Column
import javax.persistence.Entity
import javax.persistence.FetchType
Expand All @@ -25,11 +24,11 @@ class Comment(
@Column(nullable = false)
val date: LocalDateTime,

@ManyToOne(cascade = [REMOVE], fetch = FetchType.LAZY)
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "post_id", nullable = false)
val post: Post,

@ManyToOne(cascade = [REMOVE], fetch = FetchType.LAZY)
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "user_id", nullable = false)
val user: User
)

0 comments on commit 7984dd1

Please sign in to comment.