The method shown below is not fetching data from db with the criteria strProductId. I'm getting the value of strProductId inside the method. Can anyone please help..Thanks in advance....
public List<ProductServices> getAllServices(String strProductId){
Session session = sessionFactory.getCurrentSession();
Criteria cr = session.createCriteria(ProductServices.class);
cr.add(Restrictions.eq("productId", strProductId));
return (List<ProductServices>) cr.list();
}