Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Query(value = "SELECT * FROM article a " +
- "WHERE EXISTS (SELECT 1 " +
- "FROM article_category ac " +
- "where ac.article_id = a.id and ac.category_id in ('32', '34')" +
- " having count(*) = 2)", nativeQuery = true)
- List<Article> selectTwoArticleByCategories(Long category1_id, Long category2_id);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement