My situation is similar to this (note: for those who work with JBPM, you may already be familiar with the following data structures and HB mapping)
The LongInstance class extends from VariableInstance, with a mapping for the value of a field overridden in LongInstance. The mapping for VariableInstance is here and for LongInstance is here .
VariableInstance is mapped polymorphically to the collection in TokenVariableMap, mapping here .
Question: how can I query a polymorphic collection using a specific / overridden property of a member class?
I'm looking for something like this "... from TokenVariableMaps tvm left join fetch tvm.variableInstances tvi where cast (tvi as LongInstance) .value in (: vars)"
source share