You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've come in quite a few cases where I wish only the fields that differ from the default value in the class is saved.
For instance, if I have a section that has a type property, and some fields are only relevant to one type, or if I just have a lot of fields, and the default values will be fine for many of them in most cases.
It should still be possible to force some fields to be saved, but that could be done with an annotation. Or we could go the other way and annotate fields that only should be hidden if they have the default value.
The text was updated successfully, but these errors were encountered:
While it might not do everything you described, we already have a system to hide defaults: Reflected#setDefault
I cannot remember if you can directly call addInheritedField & removeInheritedField directly too.
I've come in quite a few cases where I wish only the fields that differ from the default value in the class is saved.
For instance, if I have a section that has a type property, and some fields are only relevant to one type, or if I just have a lot of fields, and the default values will be fine for many of them in most cases.
It should still be possible to force some fields to be saved, but that could be done with an annotation. Or we could go the other way and annotate fields that only should be hidden if they have the default value.
The text was updated successfully, but these errors were encountered: