-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat : Implement board delete API #147
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,17 @@ | |
import java.util.List; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Modifying; | ||
import org.springframework.data.jpa.repository.Query; | ||
|
||
import com.gamzabat.algohub.feature.board.domain.Board; | ||
import com.gamzabat.algohub.feature.board.domain.BoardComment; | ||
|
||
public interface BoardCommentRepository extends JpaRepository<BoardComment, Long> { | ||
|
||
List<BoardComment> findAllByBoard(Board board); | ||
|
||
@Modifying | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ์๋ ๋ญ๊ฐ์?? ์ฒ์๋ด There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1์ฐจ์บ์ ๋ ๋ ค์ฃผ๋ ์ด๋
ธํ
์ด์
์ด์์. ์ ๊ฑฐ ์ํ๋ฉด 1์ฐจ์บ์ ๋จ์์, |
||
@Query("delete from BoardComment c where c.board = :board") | ||
void deleteAllCommentByBoard(Board board); | ||
} |
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.
์ด๊ฑด ์คํ์๊ธธ๋ ๊ฑฐ์ฌ๋ ค์ ๊ณ ์ณค์ด์.