Correction of sql query.
This commit is contained in:
@@ -19,7 +19,7 @@ public interface PostRepository extends CrudRepository<Post, Long>, PostSearchRe
|
|||||||
nativeQuery = true)
|
nativeQuery = true)
|
||||||
List<Post> getLast(@Param("limit") final Integer pLimit);
|
List<Post> getLast(@Param("limit") final Integer pLimit);
|
||||||
|
|
||||||
@Query(value = "SELECT * FROM post p WHERE category_id = :categoryId ORDER BY creation_date DESC",
|
@Query(value = "SELECT * FROM post p INNER JOIN \"user\" u ON u.id = creator_id WHERE category_id = :categoryId ORDER BY creation_date DESC",
|
||||||
nativeQuery = true)
|
nativeQuery = true)
|
||||||
List<Post> getByCategoryId(@Param("categoryId") final Long pCategoryId);
|
List<Post> getByCategoryId(@Param("categoryId") final Long pCategoryId);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user