ReplyRepository
페이지 정보
본문
package web.repository;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import web.domain.Reply;
public interface ReplyRepository extends JpaRepository<Reply, Long> {
@Query("select r from Reply r where r.board.bno = :bno") //Reply : 클래스 명
Page<Reply> listOfBoard(@Param("bno") Long bno, Pageable pageable);
void deleteByBoard_Bno(@Param("bno") Long bno);
}
- 이전글Board ( orphanRemoval 속성 적용 ) 24.06.28
- 다음글④ BoardRepositoryTest ( remove ) 24.06.28
댓글목록
등록된 댓글이 없습니다.