Fix bug Error on deleting an Order whichConstraintViolationException on deleting an Order which had a Label related to another Order or Template
There is a n-m relatioship between Label and Order. The relationship shoudl be updated on saving an Order but removing an Order does not imply removing its Labels as it might be related to another Order or even to another Template. FEA: ItEr60S04ValidacionEProbasFuncionaisItEr59S04
This commit is contained in:
parent
81d3193b5b
commit
6f167388ae
2 changed files with 2 additions and 2 deletions
|
|
@ -26,7 +26,7 @@
|
|||
</set>
|
||||
|
||||
<!-- Assess many-to-many bidireccional -->
|
||||
<set name="labels" table="ORDER_ELEMENT_LABEL" access="field" cascade="all">
|
||||
<set name="labels" table="ORDER_ELEMENT_LABEL" access="field" cascade="save-update">
|
||||
<key column="ORDER_ELEMENT_ID" not-null="true"/>
|
||||
<many-to-many column="LABEL_ID" class="org.navalplanner.business.labels.entities.Label"/>
|
||||
</set>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
<one-to-many class="org.navalplanner.business.materials.entities.MaterialAssignmentTemplate" />
|
||||
</set>
|
||||
|
||||
<set name="labels" table="ORDER_ELEMENT_TEMPLATE_LABEL">
|
||||
<set name="labels" table="ORDER_ELEMENT_TEMPLATE_LABEL" cascade="save-update">
|
||||
<key column="ORDER_ELEMENT_TEMPLATE_ID" not-null="true" />
|
||||
<many-to-many column="LABEL_ID" class="org.navalplanner.business.labels.entities.Label"/>
|
||||
</set>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue