In my application i have list of category ids.Now i want to get products from database based on product category which will be contains in that list and also product name like some "XYZ".How can achieve this by using IN clause. Is anyone have any idea i tried this by passing way but i get empty list
My Code is :
Object[] cids=final_cats.toArray();
String cds=final_cats.toString();
String query="select fpd from FTextProductDetails ftpd inner join ftpd.fProductDetails fpd WHERE fpd.categoryId in( "+cds+" )and ftpd.productName like ?" ;
Object[] values=new Object[]{'%'+productName+'%'};
List<Object[]> list=HibernatePaginationImpl.findProductsByName(query, values,pageSizeLimit , pageNumber,this.baseDao);
here final_cats have all categories.