show only one entry per article suggestions fix #96
This commit is contained in:
parent
53cdb20091
commit
cd1a8568e6
|
@ -29,7 +29,7 @@ public interface ArticleRepository extends JpaRepository<Article, Long> {
|
|||
@Query("SELECT a FROM CustomerOrderPosition cop JOIN cop.order co JOIN co.customer c JOIN cop.article a ORDER BY co.id DESC")
|
||||
List<Article> getOrderedArticles();
|
||||
|
||||
@Query("SELECT a FROM CustomerOrderPosition cop JOIN cop.order co JOIN co.customer c JOIN cop.article a WHERE c.id = :customerId ORDER BY co.id DESC")
|
||||
@Query("SELECT DISTINCT a FROM CustomerOrderPosition cop JOIN cop.order co JOIN co.customer c JOIN cop.article a WHERE c.id = :customerId ORDER BY co.id DESC")
|
||||
List<Article> getOrderedArticles(long customerId);
|
||||
|
||||
/***
|
||||
|
|
Reference in New Issue