0

I have a list of strings and i need to search them in my table then construct new class contain key as on of my search strings and value as my pojo if exist or null if not exist.

something like that :

Class MyMapper {

    private String identificationKey;
    private User user;
    // Getter and Setter

}

My Expected Query:

SELECT NEW MyMapper(identificationKey, u) From User u where u.identification IN :identificationKeys

i need to select every identificationKey in identificationKeys even not exist

Mohamed AbdElRazek
  • 1,654
  • 14
  • 17
  • Probably this could help http://stackoverflow.com/questions/9321916/jpa-criteriabuilder-how-to-use-in-comparison-operator or http://stackoverflow.com/questions/24109412/in-clause-with-a-composite-primary-key-in-jpa-criteria – Harshul Pandav Dec 06 '14 at 17:25
  • and what have you tried? and what is the problem? – Neil Stockton Dec 07 '14 at 08:10
  • The problem as i illustrated in my question, i need query can select every string found in list using after In clause – Mohamed AbdElRazek Dec 07 '14 at 08:17

0 Answers0