I am trying to convert the following SQL to equivalent Hibernate Query.

SELECT ti.id_, ti.name_, t.processinstance_, pi.processdefinition_
  FROM jbpm_taskinstance ti, jbpm_token t, jbpm_processinstance pi
 WHERE ti.token_ = t.id_
   AND t.processinstance_ = pi.id_
   AND pi.processdefinition_ = 1474
   AND ti.name_ = 'Initiate Swap'
   AND ti.isopen_ = 0
This query is given 1 record from the DB

But when I am trying the equivalent Hibernate query it is not giving any 
results. (No one has deleted the data in the meantime, though ;-)

SELECT ti
        FROM org.jbpm.taskmgmt.exe.TaskInstance ti join ti.token  tok join 
tok.processInstance  pi
        WHERE 
        pi.processDefinition = (:processDefinitionId)
   AND ti.name = (:name)
   AND ti.isOpen = (:state)
I have set the same values for the parameters.


By any choice am I missing any basic elements?


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021047#4021047

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021047
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to