Skip to content

[Quarkus 4] Use entity types in criteria joins - #55198

Merged
vmuzikar merged 1 commit into
keycloak:mainfrom
Pepo48:issue-55197
Nov 16, 2026
Merged

vmuzikar merged 1 commit into
keycloak:mainfrom
Pepo48:issue-55197

Conversation

@Pepo48

@Pepo48 Pepo48 commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Closes: #55197

This can land directly in main - all join types match their entity mappings, including Map<String, String> configuration,
join names, join types, predicates and query execution remain unchanged.

Closes: keycloak#55197

Signed-off-by: Peter Zaoral <pzaoral@redhat.com>
@Pepo48
Pepo48 requested a review from a team as a code owner November 14, 2026 19:30
Copilot AI lite review requested due to automatic review settings November 14, 2026 19:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified, and the changes consistently align the Criteria joins with their mapped entity and map types.

No open issues 🎉

What changed in this PR

Updates JPA Criteria API join declarations to use the concrete entity and map types defined by the corresponding entity mappings, aligning the code with Jakarta Persistence 4 without changing query behavior.

Changes:

  • Typed the user federated-identity join with UserEntity and FederatedIdentityEntity.
  • Typed policy scope, configuration, and associated-policy joins with their mapped entity and map types.
  • Added the required ScopeEntity import.
File Description
model/​jpa/​src/​main/​java/​org/​keycloak/​models/​jpa/​JpaUserProvider.java Uses concrete entity types for the user-to-federated-identity Criteria join.
model/​jpa/​src/​main/​java/​org/​keycloak/​authorization/​jpa/​store/​JPAPolicyStore.java Uses concrete entity and map key/value types for policy Criteria joins.

Review effort: Lite

@Pepo48 Pepo48 mentioned this pull request Nov 14, 2026
16 of 20 tasks

@vmuzikar vmuzikar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@vmuzikar
vmuzikar merged commit 8d7e8a8 into keycloak:main Nov 16, 2026
97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Quarkus 4] Use entity types in criteria joins

3 participants