MetaModels / core

MetaModels Core Module
GNU Lesser General Public License v3.0
96 stars 42 forks source link

Deprecate IAttribute::modelSaved()? #1178

Open richardhj opened 7 years ago

richardhj commented 7 years ago

The modelSaved method is not called reliable, i.e. as for the alias generation (see comments 1-3 at https://github.com/MetaModels/contao-frontend-editing/issues/6).

We can a) deprecate the modelSaved() and switch to the pre-persist event of the DCG. Problem: The event has no knowledge of its prior value, and an alias value might be overwritten even if already present in the database. b) pass the up-to-date data to the modelSaved(). Problem: more time costs at runtime

(@discordier feel free to edit this post)

discordier commented 6 years ago

We must re-evaluate if the event will solve the problem, as it might not work anymore as dcg now clears values depending on extra "alwaysSave" etc.

zonky2 commented 2 years ago

@discordier is this obsolete? the attribute alias works fine at FEE