我想在我的ORDER BY子句中使用表达式。这在SpringDataJPA中是可能的吗?Spring提供了_org.springframework.data.domain.Sort.Sor_t来处理排序,但它不包含任何按情况处理订单的函数。我希望实现与以下JPA语句相当的功能,但使用Spring:
ORDER BY CASE WHEN Tbl
我使用Spring PageRequest根据数据库中的列对自定义查询进行排序(排序)。Query( value = "select h from hunterhouse h join h.queens q where q.name = 'Computer Science'")
在我要连接的表q中,不能按列排序吗?= new PageRequest(page, size, Sort.Direction.DESC
这可能不是最好的问题,但我注意到Spring boot有2个SpringJPA。它们有什么不同。目前,我正在尝试与hibernate一起安装SpringBoot 1.5.3项目。我记得我之前用spring-boot-starter-data-jpa设置了Springboot with JPA。我见过的大多数在线示例以及starter.spring.io都为springjpa提供