[jboss-user] [JBoss jBPM] - Hibernate Query To SQL Query Mismatch

Anandnatraj do-not-reply at jboss.com
Fri Feb 23 05:54:49 EST 2007


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



More information about the jboss-user mailing list