0 Replies Latest reply on Dec 2, 2010 1:51 AM by parvathy j a

    Querying problem in JBPM4.4

    parvathy j a Newbie



         I would like to select all rows from tables JBPM4_HIST_ACTINST and JBPM4_TASK where  JBPM4_HIST_ACTINST.HTASK_ =JBPM4_TASK.DBID_..

      i have used criteria and detached criteria for this...but i dunno how to select all the rows..so that i could return it as a List<Object> rather than a List of specific table entity..

      My code is

      Criteria criteriaObj=session.createCriteria(HistoryTaskImpl.class);

      criteriaObj.add(Restrictions.eq("assignee", userId));

      criteriaObj.add(Restrictions.eq("state", status));

      criteriaObj.add(Restrictions.eq("serviceName", serviceName));

      criteriaObj.add(Restrictions.between("createTime", dateFrom, dateTo));

      DetachedCriteria ownerCriteria = DetachedCriteria.forClass(HistoryActivityInstanceImpl.class);
      ownerCriteria.add(Restrictions.eq("transitionType", transitionType));



      List<Object> obj=(List<Object>)criteriaObj.list();


      This would return an object which contains only HistoryTaskImpl columns..but i want HistoryActivityInstanceImpl columns also..

      Plz do help in this

      Thanking you