cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Delete source in one to many relationship if target doesnt hold any value

Former Member
0 Likes
315

I would like to delete Country if it doesn't hold at least one region. Do we have any way of handling this?

<relation code="Country2RegionRelation" generate="true" localized="false" autocreate="true">    <sourceElement type="Country" qualifier="country" cardinality="one">       
<modifiers read="true" write="true" search="true" optional="false" unique="true"/>
</sourceElement>  
<targetElement type="Region" qualifier="regions" cardinality="many">
<modifiers read="true" write="true" search="true" partof="true"/>
</targetElement>
</relation>

Accepted Solutions (0)

Answers (1)

Answers (1)

arvind-kumar_avinash
Active Contributor
0 Likes

You can do it as follows:

REMOVE Country[batchmode=true];regions[unique=true](isocode)
;null