[jboss-jira] [JBoss JIRA] Created: (JBPM-928) filter missing in hibernate mapping for ProcessDefinition

Britt Miner (JIRA) jira-events at lists.jboss.org
Wed Apr 4 18:14:58 EDT 2007


filter missing in hibernate mapping for ProcessDefinition
---------------------------------------------------------

                 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