我想在我的表中进行分页选择,但它声称此错误。有人知道如何解决吗?
org.postgresql.util.PSQLException:错误:对于SELECT DISTINCT,ORDER BY表达式必须出现在选择列表中
@Query(value = "SELECT DISTINCT budget.* FROM budget LEFT JOIN user_budget ON budget.id = user_budget.budget_id ORDER BY budget.created DESC, ?#{#pageable}",
countQuery = "SELECT DISTINCT count(*) FROM budget LEFT JOIN user_budget ON budget.id = user_budget.budget_id",
nativeQuery = true)
public Page<Budget> findAllByfilter(Pageable pageable);