I was using Hibernate 2.1.2.
I want to upgrade to 2.1.3. When I did so I got "InvalidColumnException: pi" on the following query string:
Code:
private static final String queryFindAllProcessInstances =
"select distinct pi " +
"from org.jbpm.workflow.execution.impl.ProcessInstanceImpl pi," +
" org.jbpm.workflow.execution.impl.FlowImpl f " +
"where f.processInstance = pi ";
NOTE:With 2.1.2 it works fine.
By the 2.1.3 changelog I didn't see nothing regarding this topic.
Any help please?
-------------------------------------------
Mapping files (JBPM Workflow files)
-------------------------------------------
ProcessInstanceImplCode:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class
name="org.jbpm.workflow.execution.impl.ProcessInstanceImpl"
table="JBPM_PROCESSINSTANCE"
dynamic-update="false"
dynamic-insert="false"
>
<id
name="id"
column="id"
type="long"
unsaved-value="null"
>
<generator class="org.jbpm.util.db.IdGenerator">
</generator>
</id>
<property
name="start"
type="timestamp"
update="true"
insert="true"
column="start_"
/>
<property
name="end"
type="timestamp"
update="true"
insert="true"
column="end_"
/>
<property
name="initiatorActorId"
type="string"
update="true"
insert="true"
column="initiatorActorId"
/>
<many-to-one
name="processDefinition"
class="org.jbpm.workflow.definition.impl.ProcessDefinitionImpl"
cascade="none"
outer-join="auto"
update="true"
insert="true"
column="processDefinition"
/>
<many-to-one
name="rootFlow"
class="org.jbpm.workflow.execution.impl.FlowImpl"
cascade="all"
outer-join="auto"
update="true"
insert="true"
column="rootFlow"
/>
<many-to-one
name="superProcessFlow"
class="org.jbpm.workflow.execution.impl.FlowImpl"
cascade="none"
outer-join="auto"
update="true"
insert="true"
column="superProcessFlow"
/>
</class>
</hibernate-mapping>
FlowImplCode:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class
name="org.jbpm.workflow.execution.impl.FlowImpl"
table="JBPM_FLOW"
dynamic-update="false"
dynamic-insert="false"
>
<id
name="id"
column="id"
type="long"
unsaved-value="null"
>
<generator class="org.jbpm.util.db.IdGenerator">
</generator>
</id>
<property
name="name"
type="string"
update="true"
insert="true"
column="name"
/>
<property
name="actorId"
type="string"
update="true"
insert="true"
column="actorId"
/>
<property
name="start"
type="timestamp"
update="true"
insert="true"
column="start_"
/>
<property
name="end"
type="timestamp"
update="true"
insert="true"
column="end_"
/>
<property
name="parentReactivation"
type="boolean"
update="true"
insert="true"
column="parentReactivation"
/>
<many-to-one
name="node"
class="org.jbpm.workflow.definition.impl.NodeImpl"
cascade="none"
outer-join="auto"
update="true"
insert="true"
column="node"
/>
<many-to-one
name="processInstance"
class="org.jbpm.workflow.execution.impl.ProcessInstanceImpl"
cascade="none"
outer-join="auto"
update="true"
insert="true"
column="processInstance"
/>
<set
name="attributeInstances"
lazy="true"
inverse="false"
cascade="all"
sort="unsorted"
>
<key
column="scope"
/>
<one-to-many
class="org.jbpm.workflow.execution.impl.AttributeInstanceImpl"
/>
</set>
<set
name="subProcessInstances"
lazy="true"
inverse="false"
cascade="none"
sort="unsorted"
>
<key
column="superProcessFlow"
/>
<one-to-many
class="org.jbpm.workflow.execution.impl.ProcessInstanceImpl"
/>
</set>
<many-to-one
name="parent"
class="org.jbpm.workflow.execution.impl.FlowImpl"
cascade="none"
outer-join="auto"
update="true"
insert="true"
column="parent"
/>
<set
name="children"
lazy="true"
inverse="false"
cascade="all"
sort="unsorted"
>
<key
column="parent"
/>
<one-to-many
class="org.jbpm.workflow.execution.impl.FlowImpl"
/>
</set>
<set
name="logs"
lazy="true"
inverse="false"
cascade="all"
sort="unsorted"
>
<key
column="flow"
/>
<one-to-many
class="org.jbpm.workflow.log.impl.LogImpl"
/>
</set>
</class>
</hibernate-mapping>