Enable DC_General versioning for render settings, input screens, - #1592
Merged
Conversation
filter settings and MetaModel items Turns on "enableVersioning" for tl_metamodel_dcasetting, tl_metamodel_rendersettings, tl_metamodel_filtersetting and the tl_metamodel_item base DCA every mm_* table inherits from - now reachable thanks to the accompanying dc-general fix. Implements item-level versioning in MetaModels\DcGeneral\Data\Driver (saveVersion/getVersion/getVersions/setVersionActive/getActiveVersion), property-based rather than a raw row copy: it reuses the same Model::getProperty()/setProperty() path a normal edit already takes (through each attribute's valueToWidget()/widgetToValue()), so complex attributes (tags, table fields, ...) are covered without any attribute-specific code - see .claude/dcg-versionierung.md. DataProviderBuilder::build() also hard-coded setVersioningEnabled(false) for MetaModels items specifically, mirroring the dc-general bug this change relies on being fixed. And Driver::sameModels() had an unrelated, pre-existing bug of its own: it compared both items' shared MetaModel instance instead of their values, which is always true and short-circuited the real per-attribute comparison below it - every save looked "unchanged" to storeVersion() after the first version, so no further versions were ever recorded.
Resolves a conflict in DataProviderBuilder::build() between this branch's DCA-driven setVersioningEnabled() and release/2.5's setLoggingEnabled(false) (from the systemlog feature) - both are independent and kept.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
filter settings and MetaModel items
Turns on "enableVersioning" for tl_metamodel_dcasetting, tl_metamodel_rendersettings, tl_metamodel_filtersetting and the tl_metamodel_item base DCA every mm_* table inherits from - now reachable thanks to the accompanying dc-general fix.
Implements item-level versioning in MetaModels\DcGeneral\Data\Driver (saveVersion/getVersion/getVersions/setVersionActive/getActiveVersion), property-based rather than a raw row copy: it reuses the same Model::getProperty()/setProperty() path a normal edit already takes (through each attribute's valueToWidget()/widgetToValue()), so complex attributes (tags, table fields, ...) are covered without any attribute-specific code - see .claude/dcg-versionierung.md.
DataProviderBuilder::build() also hard-coded setVersioningEnabled(false) for MetaModels items specifically, mirroring the dc-general bug this change relies on being fixed. And Driver::sameModels() had an unrelated, pre-existing bug of its own: it compared both items' shared MetaModel instance instead of their values, which is always true and short-circuited the real per-attribute comparison below it - every save looked "unchanged" to storeVersion() after the first version, so no further versions were ever recorded.