Allow DataModel.migrateData to be called recursively for models which are not direct children of the root model schema. #8763
Labels
api
Issues related to the API used by Mod Devs
bug
Functionality which is not working as intended
data-models
Issues related to data models and schema changes
Milestone
Implemented Solution
Data model migration (via the
DataModel.migrateData
method) is now fully recursive allowing for models which are not direct descendants of the root DataModel to also be migrated.Example Usage
Original Report
Originally reported by Mana#4176 https://discord.com/channels/170995199584108546/956306859491471420/1065042256559624202
ALL MODULES DISABLED? true
OS, Hosting, Browser (if applicable): any
Short Description of bug: DataModel#migrateData() is not run for EmbeddedDataField contents.
Simple steps to reproduce the bug:
Implement DataModel with noisy migrateData in EmbeddedDataField.
You'll notice the migrateData is never run.
Update: This may be a problem only when the EmbededDataField is inside another data field, like ArrayField or SchemaField.
Update 2: Minimal example fails to reproduce the issue (when used in dev tools console without hooking into system models).
The text was updated successfully, but these errors were encountered: