-
Feature Request
-
Resolution: Done
-
Major
-
None
-
None
The transformation context needs attachments, and the operation context attachments should be propagable to the transformation context so that the write attribute handlers can give signals to the transformers. We don't want to propagate everything, so I have created TransformerOperationAttachment which in turn contains attach() methods. Only attachments added there get propagated.
One use case is if the old model used child resources, so it has child=1, child=2. If the new model was refactored to use this as a map attribute on the parent resource, when the attribute is overwritten, the transformer needs to create a composite to add what is new, remove what is missing, and update things which were changed. However, this is not known to the transformer. So the idea is that the write attribute handler can use these attachments to signal the transformer about what has been added and removed by comparing the new and old values.