fix : disable SQL
This commit is contained in:
@@ -11,12 +11,12 @@ import java.util.List;
|
||||
public interface ArticleRepository extends JpaRepository<Article,Long> {
|
||||
|
||||
@EntityGraph(attributePaths = "tagList")
|
||||
@Query("SELECT a FROM Article a JOIN Tag t ON a.id = t.article.id")
|
||||
@Query("SELECT a FROM Article a JOIN Tag t ON a.id = t.article.id ORDER BY a.createdDate DESC")
|
||||
List<Article> findByTag(String tag, Pageable pageable);
|
||||
|
||||
@Query("SELECT a FROM Article a WHERE a.author.username = :author")
|
||||
@Query("SELECT a FROM Article a WHERE a.author.username = :author ORDER BY a.createdDate DESC")
|
||||
List<Article> findByAuthorName(String author, Pageable pageable);
|
||||
|
||||
@Query("SELECT a FROM Article a LEFT JOIN Favorite f ON f.article.id = a.id WHERE f.user.username =:username")
|
||||
@Query("SELECT a FROM Article a LEFT JOIN Favorite f ON f.article.id = a.id WHERE f.user.username =:username ORDER BY a.createdDate DESC")
|
||||
List<Article> findByFavoritedUser(String username, Pageable pageable);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
|
||||
spring.jpa.hibernate.ddl-auto=create
|
||||
spring.jpa.properties.hibernate.format_sql=true
|
||||
spring.jpq.show-sql=true
|
||||
spring.jpa.properties.hibernate.show_sql=true
|
||||
|
||||
#secret
|
||||
|
||||
|
||||
Reference in New Issue
Block a user