[jboss-jira] [JBoss JIRA] Commented: (JBPM-928) ProcessDefinition.hbm maps Nodes incorrectly
Tom Baeyens (JIRA)
jira-events at lists.jboss.org
Wed May 16 03:18:03 EDT 2007
[ http://jira.jboss.com/jira/browse/JBPM-928?page=comments#action_12362314 ]
Tom Baeyens commented on JBPM-928:
----------------------------------
the real solution must be that <key column="PROCESSDEFINITION_" /> is replaced by <key column="NODES_PD_" />
... but that changes the schema. so we can only fix this in 3.3
i'll try and document this as a known problem and add the fix in case people want to update their schema.
> ProcessDefinition.hbm maps Nodes incorrectly
> --------------------------------------------
>
> Key: JBPM-928
> URL: http://jira.jboss.com/jira/browse/JBPM-928
> Project: JBoss jBPM
> Issue Type: Bug
> Components: Core Engine
> Affects Versions: jBPM jPDL 3.2, jBPM 3.1.2
> Reporter: Britt Miner
> Assigned To: Tom Baeyens
>
> Symptom: processDefinition.findNode(), getNode(), getNodeList(), and getNodesMap() (basically all node related methods on ProcessDefinition) fail to properly find or return all Nodes when SuperStates are present.
> Cause: Hibernate mapping for ProcessDefinition does not recognize that NODEINDEXCOLLECTION_ on the jbpm_node table may have duplicated values per ProcessDefinition (members of a SuperState comprise a separate node collection in this column) and only picks up the last Node with a given NODEINDEXCOLLECTION_ value.
> The list-index line is the problem:
> <list name="nodes" cascade="all">
> <cache usage="nonstrict-read-write"/>
> <key column="PROCESSDEFINITION_" />
> <list-index column="NODECOLLECTIONINDEX_" />
> <one-to-many class="org.jbpm.graph.def.Node" />
> </list>
> Solution: Perhaps usage of a Set instead of a list would solve the problem (Sets don't use 'list-index'), or a Hibernate Bag collection would allow usage of a List in the object without the requirement of list-index (with an associated performance hit). Or perhaps some type of Hibernate filter could be used.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list