Allow to ignore specific field in patchers #161
Labels
blocked
Ticket cannot be implemented because it depends on another ticker or external factor
dragons ahead
Task which requires handwriting compiletime reflection for Scala2&3 and/or updating the architecture
enhancement
Milestone
Right now it is possible to ignore all the redundant fields in the patcher with
ignoreRedundantPatcherFields
which is significantly unsafe.I think it might be a good idea to allow to specify the fields to be ignored explicitly. My current use case below contains 3 different possible uses of such a feature.
First, the most obvious one is that I want to ignore redundant fields (
a
when patchingBar
andb
when patchingFoo
). This can be achieved withignoreRedundantPatcherFields
yet with explicit specification I'm safe from the situation when I add a field and its omitted from patching accidentally.Second is that I ignore
id
when patchingFoo
because I already know its the same value. Or at least I assume so and if this assumption is wrong (due to a bug) I may end up with a very weird state once data is patched including thisid
field.Third is that
Bar
also contains a field namedid
which I not only don't want to patch but also this field is of a completely incompatible type. Currently, I have to fall back tocopy
as I don't know any workaround for this part.The text was updated successfully, but these errors were encountered: