0

I have a class named as Films and it has id, filmName, actionStatus and so on. I want to take the filmNames where its actionStatus=4. There are many filmNames with actionStatus=4.

I tried to do it this way:

 Session ses = model.DBManager.getInstance().getSession();
 List<Films> film_list;
 Criteria criFilm = ses.createCriteria(Films.class);
 criFilm.add(Restrictions.eq("actionStatus", 4));
 film_list = criFilm.list();

 for (Films films : film_list) {
     System.out.println("film details " + films.getFilmName());
 }

I'm not getting the required outputs by the above code.

Please help.

Tiny
  • 27,221
  • 105
  • 339
  • 599
mkmp
  • 142
  • 2
  • 9
  • 2
    Post the complete stack trace of the exception. Always. And post the relevant code: the Films entity (which should be named `Film` BTW). – JB Nizet Dec 27 '15 at 16:29
  • Hi, Is actionStatus is a class reference or field? – hKs Dec 28 '15 at 07:08

0 Answers0