If anyone has any ideas at all, I'd be very grateful.
Thanks again, Pete.
See on VariableInstance.hbm.xml it doesn't have a value property.
Thanks vtysh, that's true, but LongInstance is a sub-class of VariableInstance. And it does define a value property:
<hibernate-mapping default-access="field"> <subclass name="org.jbpm.context.exe.variableinstance.LongInstance" extends="org.jbpm.context.exe.VariableInstance" discriminator-value="L"> <property name="value" type="long" column="LONGVALUE_" /> </subclass> </hibernate-mapping>
So shouldn't it be calling the subclass value method? Or do I need to alter my query somehow to reference org.jbpm.context.exe.LongInstance?
I'm no expert but in src\java.jbpm.test\org\jbpm\context\exe\VariableQueryDbTest.java
there is an example of a query to another type of value. Granted it does not use org.jbpm.context.exe.VariableInstance but org.jbpm.context.exe.variableinstance.XXX directly which is probably not what you are hoping for. Jbpm has quite some code to handle the mapping of variables. I guess that's not a good sign. Maybe in a hibernate specific forum you'll have better luck.