Closed LaszloKecskes closed 4 months ago
Is this also used when editing multiple entities at once?
No, this is only used in those two places mentioned in the issue: setting permissions, and accepting suggestions.
The current development for relationship support (#6800) to IX needed half of this change to properly handle title and inherited value denormalizations on suggestion acceptance. After that PR is merged, this will only have the permission part remaining, so it makes sense to take a look at it to close this issue.
We have an old entities.saveMultiple function, which is an old function that does not contain all hooks that the singular save function does (in order to be more efficient). Most notably, the denormalization functionality is not triggered by it.
On a cursory glance, it is currently used in the places: in setting permissions, and accepting suggestions in IX. Not having these extra actions might cause problems in the future, for example:
The task is:
Since these usages are most likely getting input through user interaction, and thus will have short inputs, a simple solution would be just remove this saveMultiple function and save those entities one by one, as we usually do in other places in Uwazi.