JPA query creation order by

后端 未结 4 1573
孤城傲影
孤城傲影 2021-02-18 22:07

I\'m trying to learn Spring on my own, and I\'m planning to do that by creating a blog web app. I already have the basic blog functionality working, which is a page to display b

4条回答
  •  无人共我
    2021-02-18 22:40

    I know I'm a little late to the game but..

    Another fix would be to correct the syntax on your named query in your repository.

    You have: Iterable findAllOrderByIdDesc();

    When it should be: Page findAllByOrderByIdDesc();

    Note the addition of the By keyword after findAll. This marks the beginning of your filtering statements.

提交回复
热议问题