package com.guams.review.model; import com.guams.review.model.dao.Post; import org.springframework.data.jdbc.repository.query.Query; import org.springframework.data.repository.CrudRepository; import org.springframework.stereotype.Repository; import java.util.List; import java.util.UUID; @Repository public interface PostRepository extends CrudRepository { @Query("select id, description, illustration, title, body, category, publication_date " + "from post join publication on post.id=publication.post_fk where publication.author_fk=:authorId") List findPostsOfAuthor(UUID authorId); List findAll(); }