Interface CommentRepo

All Superinterfaces:
org.springframework.data.repository.CrudRepository<CommentEntity,Integer>, JpaRepository<CommentEntity,Integer>, org.springframework.data.repository.ListCrudRepository<CommentEntity,Integer>, org.springframework.data.repository.ListPagingAndSortingRepository<CommentEntity,Integer>, org.springframework.data.repository.PagingAndSortingRepository<CommentEntity,Integer>, org.springframework.data.repository.query.QueryByExampleExecutor<CommentEntity>, org.springframework.data.repository.Repository<CommentEntity,Integer>

public interface CommentRepo extends JpaRepository<CommentEntity,Integer>
  • Method Details

    • findByPostPostID

      List<CommentEntity> findByPostPostID(int postID)
    • findCommentsWithMemberInfoByPostID

      @Query("SELECT new com.eeit87t3.tickiteasy.post.dto.ShowCommentDTO(c.postID, c.postCommentID, c.memberID, c.content, c.commentDate, c.editTime, m.nickname, m.profilePic) FROM CommentEntity c JOIN Member m ON c.memberID = m.memberID WHERE c.postID = :postID") List<ShowCommentDTO> findCommentsWithMemberInfoByPostID(@Param("postID") Integer postID)