Hello, I have duplicates when I try to retrieve all entries of a user in a MySQL table.
I use JPA with the "pageable" object and a GROUP BY :
@Query("SELECT s FROM Service s WHERE s.userId = ?1 ORDER BY s.uploadDate DESC")
Page<Service> findAllByUserId(Integer userId, Pageable pageable);
If I ORDER BY ASC and not DESC on the upload date, there aren't duplicates, only by desc.
To be exact, the problem is that the last service of the current page appears as the first service of the next page.