8000 [Quarkus 4] Preserve Oracle conflict insert hints with Hibernate 8 by Pepo48 · Pull Request #55432 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

[Quarkus 4] Preserve Oracle conflict insert hints with Hibernate 8 - #55432

Open
Pepo48 wants to merge 1 commit into
keycloak:quarkus-nextfrom
Pepo48:issue-55431
Open

Pepo48 wants to merge 1 commit into
keycloak:quarkus-nextfrom
Pepo48:issue-55431

Conversation

@Pepo48
@Pepo48 Pepo48 commented Nov 21, 2026
Copy link
Copy Markdown
Contributor

Closes: #55431

@Pepo48
Pepo48 requested a review from a team as a code owner November 21, 2026 11:31
@Pepo48 Pepo48 mentioned this pull request Nov 21, 2026
24 of 39 tasks
}
}

private static class CapturedSql extends RuntimeException {
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.

This is a nice hack, haven't seen that before. :) Other tests seem to rather leverage the Hibernate Statistics API, but this works too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I thought that Statistics are more handy for counting statements. Therefore, I was looking for a way to check the generated SQL without running it on Oracle.

In the end, AI helped me find a way to capture it with StatementInspector and throw before it runs.

Comment thread tests/base/pom.xml Outdated
Comment on lines +47 to +52
<!-- Standalone dialect checks use the same Oracle database supplier as the server tests. -->
<dependency>
<groupId>org.hibernate.accessor</groupId>
<artifactId>hibernate-accessor-bytebuddy</artifactId>
<scope>test</scope>
</dependency>
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.

Similar comment to here: #55437 (comment). We might want to discuss whether to introduce bytebuddy but that is a follow-up - it's ok for this PR.

Additionally, AI claims this:

Missing runtime dependency for the new unit tests. Quarkus’s Hibernate 8 BOM excludes hibernate-accessor-bytebuddy, which standalone SessionFactory bootstrap requires by default. The PR restores it in tests/base, but not model/jpa, so these tests fail during setup before exercising the dialect. Add the same test-scoped dependency to model/jpa/pom.xml.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Similar comment to here: #55437 (comment). We might want to discuss whether to introduce bytebuddy but that is a follow-up - it's ok for this PR.

Already captured at #55633.

Additionally, AI claims this:

Well yes, but actually no - quarkus-next already has the test-scoped dependency in model/jpa from #55200. AI should know better 😄

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.

I wonder if we need all the new extra test coverage. We already have a dedicated ConcurrentUpsertTest.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Cleaned-up a bit (I removed 3 test cases I considered to be redundant).

Closes: keycloak#55431

Signed-off-by: Peter Zaoral <pzaoral@redhat.com>
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.

2 participants

0