Closed Kircheneer closed 1 year ago
to me looks good, but I would make it the default (and sole) behavior
so @chadell your recommendation would be to drop this into 2.0 and make a backwards-incompatible change, changing the flag to be the default?
to me looks good, but I would make it the default (and sole) behavior
so @chadell your recommendation would be to drop this into 2.0 and make a backwards-incompatible change, changing the flag to be the default?
as I see it, this seems more a bugfix than a feature as this deletion mode is the one I would expect by default. Actually, I don't see the other use case. So, my approach would be to do not even define a flag for it. For the version, I am not sure it deserves a major bump, but if you want to be on the safe side, I'm not against it.
In agreement with Christian, it seemed odd to me to have this as a flag. In my mind, it should be handled the same way that order children is handled. https://diffsync.readthedocs.io/en/latest/core_engine/02-customize-diff-class.html?#change-the-order-in-which-the-element-are-being-processed
In agreement with Christian, it seemed odd to me to have this as a flag. In my mind, it should be handled the same way that order children is handled. https://diffsync.readthedocs.io/en/latest/core_engine/02-customize-diff-class.html?#change-the-order-in-which-the-element-are-being-processed
Unfortunately you can't achieve this behaviour from this MR in a custom Diff
class - this is because the Diff
class can only change the order of top level models, it never sees their children. The children (from the perspective of the Diff
class) are handled via their respective parents.
My plan is now:
Closes #97. Implement
DiffSyncModelFlags.NATURAL_DELETION_ORDER
which handlesDiffSyncAction.DELETE
elements differently by first deleting their children recursively before handling their parents.Open points