最佳答案
我有一个这样的实体类:
@Entity
@Table(name = "EMAIL")
class Email{
@Id
@Column(name = "Id")
Long id;
@Column(name = "EMAIL_ID")
String emailId;
@Column(name = "PIN_CODE")
String pincode;
}
如何为下面的查询编写 findBy
方法使用 cruditory Spring 数据 jpa?
select email_id,name from email_details where eamil_id in('mike@gmail.com','ram@gmail.com') and pin_code in('633677','733877')
我期望弹簧数据 jpa 方法像下面这样,但如何构造它?
List<Email> findBy.....(List<String> emails, List<String> pinCodes);
I want to get list of Emails in a single database hit.