-
Notifications
You must be signed in to change notification settings - Fork 2
Cascade Delete
Gal Koren edited this page Nov 12, 2020
·
1 revision
In the previous page we saw how to add a child flow to the parent flow.
Given that, we can delete a parent with a "cascade" flag turned on which will delete all of its children.
var campaignCmd = new DeleteEntityCommand(CampaignEntity.INSTANCE, new CampaignEntity.Id(123))
.setCascade(); // <------- that's the trick
campaignPersistence.delete(asList(campaignCmd));
Setting up an Entity Persistence
Query language
Building the Flow
- Adding Simple Validators
- State Consumers
- Adding a Custom Validator
- Enrichers
- Output Generators
- Customizing Flows
- Primary and Secondary Tables (detailed example)
- State Consumers and Relations (what can we fetch)
- Child Commands
- Cascade Delete