[Flock] Delete and element and all of its children [message #1101371] |
Wed, 04 September 2013 11:22 |
|
Hi,
I have a delete rule that deletes an Type. However, the result after execution is that all elements that where contained by elements of the deleted Type are left on the model (since they are now parent-less they reside at the root).
Is there any way to make a delete rule to delete all of the elements of containment relations too? Or at least a way of specifying a when statement in the lines of
Regards,
Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
|
|
|
|
|
|
Re: [Flock] Delete and element and all of its children [message #1105826 is a reply to message #1102103] |
Tue, 10 September 2013 10:21 |
Louis Rose Messages: 440 Registered: July 2009 Location: York, United Kingdom |
Senior Member |
|
|
Hi Horacio,
I've now had a chance to look at this again, and I realise that calling .equivalent() in the guard of a delete (or a retype) statement will never work! This is because it is the delete and retype statements that Flock uses to build up its equivalence table.
Instead, you can use the following:
when : owner.isKindOf(OwnerType)
Or, if the delete rule for OwnerType contains a guard:
delete OwnerType when : self.X
delete ChildType when : owner.isKindOf(OwnerType) and owner.X
Hope that helps!
Cheers,
Louis.
[Updated on: Tue, 10 September 2013 10:21] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03409 seconds