Hello!
I've been using Hibernate 2.1 b5 for quite awhile with no major problems. Last week, I switched to 2.1 final and got this error when trying to save an entity:
You may not dereference a collection with cascade="all-delete-orphan"
I switched back to b5 and the error disappeared.
The mapping file looks like this:
<hibernate-mapping>
<class name="com.ebcopfc01.opfc.vo.impl.VoAlertRuleImpl"
table="alert_rule_t">
<id name="alertRuleId" column="alert_rule_id" length="10">
<generator class="assigned"/>
</id>
...
<many-to-one name="alertRuleGroup" class="com.ebcopfc01.opfc.vo.impl.VoAlertRuleGroupImpl" column="alert_rule_group_id"/>
<many-to-one name="formula" class="com.ebcopfc01.opfc.vo.impl.VoFormulaImpl" column="formula_id"/>
<bag name="ranges"
inverse="true"
cascade="all-delete-orphan">
<key column="alert_rule_id"/>
<one-to-many class="com.ebcopfc01.opfc.vo.impl.VoAlertRuleRangeImpl"/>
</bag>
<bag name="areas"
inverse="true"
cascade="all-delete-orphan">
<key column="alert_rule_id"/>
<one-to-many class="com.ebcopfc01.opfc.vo.impl.VoAlertRuleAreaImpl"/>
</bag>
<bag name="parameters"
inverse="true"
cascade="all-delete-orphan">
<key column="alert_rule_id"/>
<one-to-many class="com.ebcopfc01.opfc.vo.impl.VoAlertRuleParameterImpl"/>
</bag>
<bag name="outputColumns"
inverse="true"
cascade="all-delete-orphan">
<key column="alert_rule_id"/>
<one-to-many class="com.ebcopfc01.opfc.vo.impl.VoAlertRuleOutputColumnImpl"/>
</bag>
</class>
Any ideas, anyone?
Regards,
Pelle P
|