Refactor Generated remove*() methods
Refactor generated remove*() methods to use deletion strategy settable through config or by overriding a new delete() method.
Blueprint information
- Status:
- Started
- Approver:
- Anthony Bush
- Priority:
- Essential
- Drafter:
- Anthony Bush
- Direction:
- Needs approval
- Assignee:
- Anthony Bush
- Definition:
- Approved
- Series goal:
- None
- Implementation:
- Beta Available
- Milestone target:
- 1.4
- Started by
- Anthony Bush
- Completed by
Whiteboard
Done:
* remove*() methods merely mark the record for deletion.
* save() invokes delete() if the record was marked for deletion.
* minimal test cases
* deletion strategy or similar should be used instead of current implementation (update CoughObject:
* if no deletion strategy is present, CoughObject:
* generator should throw an exception if deletion strategy config is not specified. When specified, appropriate method should be generated in the base/generated class allowing CoughObject:
Needs:
* more test cases (fully test the feature, e.g. test that it fails when config not set, and test other values like the out-of-box Retire one).