Does Spring Data JPA have any way to count entites using method name resolving?

后端 未结 12 934
耶瑟儿~
耶瑟儿~ 2020-12-04 08:38

Spring Data JPA supports counting entities using specifications. But does it have any way to count entities using method name resolving? Let\'s say I want a method cou

12条回答
  •  执念已碎
    2020-12-04 09:31

    I have only been working with it for a few weeks but I don't believe that this is strictly possible however you should be able to get the same effect with a little more effort; just write the query yourself and annotate the method name. It's probably not much simpler than writing the method yourself but it is cleaner in my opinion.

    Edit: it is now possible according to DATAJPA-231

提交回复
热议问题