• <legend id='FbvAE'><style id='FbvAE'><dir id='FbvAE'><q id='FbvAE'></q></dir></style></legend>
  • <tfoot id='FbvAE'></tfoot>
        <bdo id='FbvAE'></bdo><ul id='FbvAE'></ul>
      <i id='FbvAE'><tr id='FbvAE'><dt id='FbvAE'><q id='FbvAE'><span id='FbvAE'><b id='FbvAE'><form id='FbvAE'><ins id='FbvAE'></ins><ul id='FbvAE'></ul><sub id='FbvAE'></sub></form><legend id='FbvAE'></legend><bdo id='FbvAE'><pre id='FbvAE'><center id='FbvAE'></center></pre></bdo></b><th id='FbvAE'></th></span></q></dt></tr></i><div id='FbvAE'><tfoot id='FbvAE'></tfoot><dl id='FbvAE'><fieldset id='FbvAE'></fieldset></dl></div>
    1. <small id='FbvAE'></small><noframes id='FbvAE'>

        具有多个 in 运算符的 crudrepository findBy 方法签名?

        时间:2024-08-24

          <tfoot id='sATM5'></tfoot>

            <tbody id='sATM5'></tbody>

            <bdo id='sATM5'></bdo><ul id='sATM5'></ul>

          • <legend id='sATM5'><style id='sATM5'><dir id='sATM5'><q id='sATM5'></q></dir></style></legend>
              • <small id='sATM5'></small><noframes id='sATM5'>

                • <i id='sATM5'><tr id='sATM5'><dt id='sATM5'><q id='sATM5'><span id='sATM5'><b id='sATM5'><form id='sATM5'><ins id='sATM5'></ins><ul id='sATM5'></ul><sub id='sATM5'></sub></form><legend id='sATM5'></legend><bdo id='sATM5'><pre id='sATM5'><center id='sATM5'></center></pre></bdo></b><th id='sATM5'></th></span></q></dt></tr></i><div id='sATM5'><tfoot id='sATM5'></tfoot><dl id='sATM5'><fieldset id='sATM5'></fieldset></dl></div>
                  本文介绍了具有多个 in 运算符的 crudrepository findBy 方法签名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个这样的实体类:

                  I have an Entity Class like this:

                  @Entity
                  @Table(name = "EMAIL")
                  class Email{
                      @Id
                      @Column(name = "Id")
                      Long id;
                      @Column(name = "EMAIL_ID")
                      String emailId;
                      @Column(name = "PIN_CODE")
                      String pincode;
                  }
                  

                  如何使用 crudrepository spring data jpa 为以下查询编写 findBy 方法?

                  How to write findBy method for the below query using crudrepository spring data jpa?

                  select email_id,name from email_details where eamil_id in('mike@gmail.com','ram@gmail.com') and pin_code in('633677','733877')
                  

                  我期待像下面这样的 spring data jpa 方法但是如何构造它呢?

                  I am expecting the spring data jpa method like the below but how to construct it?

                  List<Email> findBy.....(List<String> emails, List<String> pinCodes);
                  

                  我想在单个数据库命中中获取电子邮件列表.

                  I want to get list of Emails in a single database hit.

                  推荐答案

                  下面的签名就可以了:

                  List<Email> findByEmailIdInAndPincodeIn(List<String> emails, List<String> pinCodes);
                  

                  Spring Data JPA 支持大量关键字来构建查询.INAND 在其中.

                  Spring Data JPA supports a large number of keywords to build a query. IN and AND are among them.

                  这篇关于具有多个 in 运算符的 crudrepository findBy 方法签名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:spring jpa @Query 错误,期待 CLOSE,发现 '(' 附近 下一篇:Spring CrudRepository 异常

                  相关文章

                    <bdo id='i8HJj'></bdo><ul id='i8HJj'></ul>

                  <small id='i8HJj'></small><noframes id='i8HJj'>

                  1. <tfoot id='i8HJj'></tfoot>

                      <i id='i8HJj'><tr id='i8HJj'><dt id='i8HJj'><q id='i8HJj'><span id='i8HJj'><b id='i8HJj'><form id='i8HJj'><ins id='i8HJj'></ins><ul id='i8HJj'></ul><sub id='i8HJj'></sub></form><legend id='i8HJj'></legend><bdo id='i8HJj'><pre id='i8HJj'><center id='i8HJj'></center></pre></bdo></b><th id='i8HJj'></th></span></q></dt></tr></i><div id='i8HJj'><tfoot id='i8HJj'></tfoot><dl id='i8HJj'><fieldset id='i8HJj'></fieldset></dl></div>
                      <legend id='i8HJj'><style id='i8HJj'><dir id='i8HJj'><q id='i8HJj'></q></dir></style></legend>