Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 jpa 实体管理器在表中查找具有如下过滤条件的条目
select * from My_Table where (status='A' or status='Z' or status='NA')
请建议一种方法来做到这一点..
假设如下:
爪哇
public List findByStatus() { return em.createQuery( "SELECT mt FROM MyTable mt WHERE mt.status in ('A', 'Z', 'NA')") .getResultList(); }