Reputation: 4917
i want to find entiries in table with filter conditions as below using jpa enity manager
select * from My_Table where (status='A' or status='Z' or status='NA')
please suggest a way to do this..
Upvotes: 1
Views: 1329
Reputation: 94499
Assuming the following:
Java
public List findByStatus() {
return em.createQuery(
"SELECT mt FROM MyTable mt WHERE mt.status in ('A', 'Z', 'NA')")
.getResultList();
}
Upvotes: 3