MID-10504 Fix enum values in role analysis attribute queries#675
Open
kay1313 wants to merge 1 commit into
Open
MID-10504 Fix enum values in role analysis attribute queries#675kay1313 wants to merge 1 commit into
kay1313 wants to merge 1 commit into
Conversation
Role analysis attribute values were stored as strings and later used directly when building repository queries. This broke enum-based attributes such as effective status, where the query expected the real enum value instead of its string representation. Use TypeSafeEnum values when extracting real attribute values so the generated query uses the correct typed value.
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.
Summary
Fixes role analysis attribute query construction for enum-based attributes.
Role analysis stores extracted attribute values as strings and later rebuilds repository queries from them. For enum attributes such as
effectiveStatus, the extracted value used the Java enum name instead of the schema lexical value, which caused the rebuilt query to use an incompatible value type and fail in SQL.This change extracts
TypeSafeEnumvalues using their schema value, so the query can be rebuilt with the correct typed enum value.Testing
Added
RoleAnalysisAttributeDefTestcovering enum attribute value extraction and typed query reconstruction foreffectiveStatus.