How to pass parameter to @Query annotation with hql

て烟熏妆下的殇ゞ 提交于 2019-12-02 13:17:57

Your query is not correct, you have an extra a between true and order by.... So the correct query would become like this

select a from Agent a where a.visibility = true order by a.id desc

Not sure if that fixes all your troubles. Check it out.

Change your query to this:

@Query("select a from Agent a where a.visibility = true order by a.id desc")
public Page<Agent> getAllAgents(Pageable pageable);
venkatesh bala

In your code, you have to write the Alice name of the table so add it.

@Query("select a from Agent a where a.visibility = true order by a.id desc")
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!