👩💻 Join our community of thousands of amazing developers!
The native SQL query we want to map in JPA is similar to the following: SELECT * FROM PARTNER where PARTNER_NUMBER IN ('id1', 'idn'). With JPA you can use a TypedQuery for example and set the expected list of the IN clause directly as query parameter @Stateless public class PartnerDataRepository { @Inject private EntityManager em; public List<PartnerData> findPartnerDataFromList( List<String> partnerNumbers) { TypedQuery<PartnerData> query = em.createNamedQuery( PartnerData.FI...