Skip to content

MID-10504 Fix enum values in role analysis attribute queries#675

Open
kay1313 wants to merge 1 commit into
masterfrom
fix/MID-10504
Open

MID-10504 Fix enum values in role analysis attribute queries#675
kay1313 wants to merge 1 commit into
masterfrom
fix/MID-10504

Conversation

@kay1313
Copy link
Copy Markdown
Contributor

@kay1313 kay1313 commented May 28, 2026

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 TypeSafeEnum values using their schema value, so the query can be rebuilt with the correct typed enum value.

Testing

Added RoleAnalysisAttributeDefTest covering enum attribute value extraction and typed query reconstruction for effectiveStatus.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant