tenwit wrote:
Is the combination of a filter on the superclass plus the subclass discriminator not fine-grained enough? What is it that you're trying to do that can't be done with those two features?
I have a similar issue; following is the example...
We would like to create jBPM TaskInstanceS that have an association to one of our Organization entities. As described in the jbpm docs, we have our own task factory that can create these instances (under a distinct jbpm configuration context).
We would like to select all OrganizationTaskInstances (mapping file below, with a dicriminator-value="O") with our owningOrg filter applied -- to only select TaskInstances "owned" by the organization of the currently logged in user.
Mapping file:
<hibernate-mapping>
<subclass
name="OrganizationTaskInstance"
extends="org.jbpm.taskmgmt.exe.TaskInstance"
discriminator-value="O">
<join table="Link_JbpmTaskInstances_Organizations">
<key column="taskInst_id" unique="true" />
<many-to-one name="organization"
class="Organization"
column="ORG_ID"
unique="true"
not-null="true" />
</join>
</subclass>
</hibernate-mapping>