-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Hibernate with JDBI #1213
Closed
Closed
Conversation
This file contains 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
Signed-off-by: nscuro <nscuro@protonmail.com>
JDBI uses reflection to map `ResultSet`s to beans or `record`s. Signed-off-by: nscuro <nscuro@protonmail.com>
Signed-off-by: nscuro <nscuro@protonmail.com>
Signed-off-by: nscuro <nscuro@protonmail.com>
…tyDao` Signed-off-by: nscuro <nscuro@protonmail.com>
By using SQL directly now, we were able to make the query behave case-insensitive on the CPE part columns. We now behave correctly according to the CPE spec! \o/ Signed-off-by: nscuro <nscuro@protonmail.com>
nscuro
added a commit
to DependencyTrack/hyades-apiserver
that referenced
this pull request
Apr 18, 2024
CPE matching must be case-insensitive as per CPE matching specification. We previously couldn't implement that, because defining indexes with computed columns was not possible in JDO. As we're now using Liquibase, and switched the matching logic to use SQL instead of JDOQL / JPQL (DependencyTrack/hyades#1213), we can finally resolve this properly. Signed-off-by: nscuro <nscuro@protonmail.com>
Signed-off-by: nscuro <nscuro@protonmail.com>
https://www.graalvm.org/jdk21/reference-manual/native-image/guides/configure-dynamic-proxies/ Signed-off-by: nscuro <nscuro@protonmail.com>
nscuro
force-pushed
the
remove-hibernate
branch
from
April 18, 2024 21:18
90ef928
to
faed8e8
Compare
Quality Gate failedFailed conditions |
Signed-off-by: nscuro <nscuro@protonmail.com>
Abandoning this for now. By hooking into Quarkus' config framework (https://quarkus.io/guides/config-extending-support#config-source-factory) we can't use any of the CDI beans anyway, and have to fall back to raw JDBC. No need for this migration right now. |
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.
Description
As preparation for the work on #929, this PR removes usages of Hibernate, and introduces the more lightweight JDBI. JDBI has already been in active use in the API server and has proven its utility.
Addressed Issue
Relates to #929
Additional Details
N/A
Checklist
This PR fixes a defect, and I have provided tests to verify that the fix is effectiveThis PR introduces changes to the database model, and I have updated the migration changelog accordinglyThis PR introduces new or alters existing behavior, and I have updated the documentation accordingly