0 Replies Latest reply on Jun 5, 2013 10:00 AM by Laura delli Paoli

    Hibernate queries on jBPM DB tables

    Laura delli Paoli Master

      Hello everybody,

      I'm trying to make a query jBPM task table, but I always get an empty list even if I can see result by DB UI.

       

      My mapping is:

       

      <class name="MyTask" table="task" dynamic-insert="true" dynamic-update="true">

                          <subselect>

                                    select id, priority, processId, processInstanceId, processSessionId, status, workItemId

                                    from task

                          </subselect>

                          <id column="id" name="id" type="java.lang.Long" />

                          <property name="priority" column="priority" type="java.lang.Integer" />

                          <property name="processId" column="processId" type="java.lang.String" />

                          <property name="processInstanceId" column="processInstanceId" type="java.lang.Long" />

                          <property name="processSessionId" column="processSessionId" type="java.lang.Integer" />

                          <property name="status" column="status" type="java.util.String" />

                          <property name="workItemId" column="workItemId" type="java.lang.Long" />

                </class>

       

      the query is:

      session.createCriteria(MyTask.class).add(Restrictions.eq("processInstanceId", new Long(pid))).list();

       

      Am I missing somethin??

      thanks

      Laura