DataModel? has the concept of dirty field: a field whose value has been changed and therefore must be written. In CPS <= 3.4.3, this is used only to avoid heavy computations, like transforms. It is necessary to avoid writing non-dirty fields. Use-cases:
- Some read expressions can be used to derive data from another source (a parent folder, for instance). This data should not be stored if we want it to stay dynamically in sync with the source. write_ignore_storage is not a valid option when we want further the user to be able to manually update it
- In MetaDirectory?, if a backend is read-only, this directly avoids writing to said backend.
- Overall performance issues with distant sources.
In [50922] and followers in CPSSchemas and CPSDirectory, this was implemented by simply restricting what's being sent to adapters. Unfortunately, this is not good enough, because adapters take care of write expressions, and some of these might need both dirty and unchanged fields.
This breaks for instance editing of user entries in some ldap setups because cross-sets neeed the unchanged used ids to write in groups directory.
The adapters should be passed the full data and indication of what has to be written.