crudrepository findBy method signature with multiple in operators?(具有多个 in 运算符的 crudrepository findBy 方法签名?)
问题描述
我有一个这样的实体类:
I have an Entity Class like this:
如何使用 crudrepository spring data jpa 为以下查询编写 findBy
方法?
How to write findBy
method for the below query using crudrepository spring data jpa?
我期待像下面这样的 spring data jpa 方法但是如何构造它呢?
I am expecting the spring data jpa method like the below but how to construct it?
我想在单个数据库命中中获取电子邮件列表.
I want to get list of Emails in a single database hit.
推荐答案
下面的签名就可以了:
Spring Data JPA 支持大量关键字来构建查询.IN
和 AND
在其中.
Spring Data JPA supports a large number of keywords to build a query. IN
and AND
are among them.
这篇关于具有多个 in 运算符的 crudrepository findBy 方法签名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!