2 Replies Latest reply on Oct 24, 2006 6:38 AM by joepugh

    HQL query to select taskinstances

    joe_pugh_2003

      Hi

      I am trying to write an HQL query which will return all TaskInstances for an actor id joining on a VariableInstance for that TaskInstance where the variable has a particular name and value. The stored VariableInstance has a variable of type Long and when I try to get the object by joining, the resulting query defaults to the StringValue column.

      Does anyone know how I could join the TaskInstance onto the VariableInstance by the Long value column?

      Basically I need something along the lines of:

      from TaskInstance as taskinstance join taskinstance.variableInstances as variable where variable.name = 'name' and variable.value = 'requiredvalue'

      But I need to tell it to use the LONGVALUE column in the table somehow.

      I am doing this to get everything that I need from the one query as it is going to be used very heavily in my application.

      Any help would be much appreciated

      Thanks

      Joe