parvathy j a [
http://community.jboss.org/people/parvathy] created the discussion
"Querying problem in JBPM4.4"
To view the discussion, visit:
http://community.jboss.org/message/573992#573992
--------------------------------------------------------------
Hi,
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.setProjection(Property.forName("historyTask"));
ownerCriteria.add(Restrictions.eq("transitionType", transitionType));
criteriaObj.add(Property.forName("dbid").in(ownerCriteria));
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
Parvathy
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/573992#573992]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]