Spring CRUD repository: is there findOneByMaxXYZColumn()?

前端 未结 3 840
小鲜肉
小鲜肉 2020-12-16 09:54

My requirement:

fetch ONE object (e.g RetainInfo ) from table RETAIN_INFO if VERSION column has max value

Does CRUD repository support for an interface met

3条回答
  •  离开以前
    2020-12-16 10:32

    Spring Data doesn't provide an expression to select a max value. All supported query parts could be found in the Spring 1.2.0.RELEASE docs: Appendix A. Namespace reference or line 182 of org.springframework.data.repository.query.parser.Part.

    Also feel free to create a feature request at Spring's Jira page.

提交回复
热议问题