fix(ModuleInstallerAPI): Rename class in DB recursively#854
Open
Hipska wants to merge 4 commits intoCombodo:developfrom
Open
fix(ModuleInstallerAPI): Rename class in DB recursively#854Hipska wants to merge 4 commits intoCombodo:developfrom
Hipska wants to merge 4 commits intoCombodo:developfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes ModuleInstallerAPI::RenameClassInDB() so class renames are reflected in the DB for inheritance chains that include intermediate classes, preventing objects from “disappearing” from queries due to stale finalclass values.
Changes:
- Replace single-root-table update with an iteration over all parent classes of the target class to update
finalclassconsistently across the inheritance chain. - Accumulate affected rows across all executed updates for logging.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
Probably it could also rename the |
Contributor
Author
|
And the |
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.
Base information
Symptom
Using
ModuleInstallerAPI::RenameClassInDBto rename classes does not work for classes having intermediate classes.Renaming
Childworks:ParentChildRenaming
Childdoes not work:ParentIntermediateChildReproduction procedure
DBserver.ModuleInstallerAPI::RenameClassInDB('DBserver', 'DBServer');as done initop-config-mgmt.SELECT SoftwareInstanceObserve the DB server objects not being listed (but they are counted in total objects).
Cause
The mentioned helper method only updates the finalclass field for the root class.
Proposed solution
Update the finalclass field for all parent classes recursively.
Checklist before requesting a review