Skip to content

HHH-17404 : Add support of reading/writing from/to special source/target in FormatMapper #9629

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

Open
wants to merge 79 commits into
base: main
Choose a base branch
from

Conversation

ejannett
Copy link
Contributor

@ejannett ejannett commented Jan 16, 2025

This PR brings code changes needed by HHH-17404.
This adds the support of Oracle OSON (JSON binary format) to Hibernate allowing improved performance over
JSON to String conversions.

Two new types are defined
org.hibernate.dialect.OracleOsonJacksonJdbcType
and
org.hibernate.dialect.OracleOsonJacksonArrayJdbcType

The support of OSON is enabled by adding the Oracle JDBC extension jar as runtime dependency.
New capabilities in FormatMapper interface have been added to support the serialization and deserialization from different sources (OSON bytes, JSON String representation ,etc..).

The entire hibernate-core test suite has been successfully run with and without the enablement of OSON.
This has been done by adding/removing the Oracle JDBC extension in hibernate-testing project build file

runtimeOnly ('com.oracle.database.jdbc:ojdbc-provider-jackson-oson:1.0.4')
  {
            exclude group: 'com.oracle.database.jdbc', module: 'ojdbc8'
  }

The hibernate.dialect.oracle.oson_format_disabled new dialect settings has been also tested. With that
setting set to true in hibernate.properties file the extension is not used.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


https://hibernate.atlassian.net/browse/HHH-17404
https://hibernate.atlassian.net/browse/HHH-14707

@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Jan 16, 2025

Thanks for your pull request!

This pull request appears to follow the contribution rules.

› This message was automatically generated.

@ejannett ejannett changed the title Hhh 17404 HHH-17404 : Add support of reading/writing from/to special source/target in FormatMapper Jan 20, 2025
@ejannett ejannett marked this pull request as ready for review March 20, 2025 13:24
@BidyadharM BidyadharM force-pushed the HHH-17404 branch 3 times, most recently from 7f6496b to c964ad8 Compare March 27, 2025 09:03
Copy link
Member

@mbellade mbellade left a comment

Choose a reason for hiding this comment

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

All major concerns should be addressed, CI is green except for oracle_atps that is failing for unrelated reasons. The PR look good to me, thanks @ejannett and @BidyadharM!

@beikov beikov added the 7.1 label May 15, 2025
@@ -0,0 +1,279 @@
/*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors

Choose a reason for hiding this comment

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

@ejannett please add the Oracle Copyright to all your contributions:
Copyright © 2025, Oracle and/or its affiliates.

Copy link
Member

Choose a reason for hiding this comment

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

Hi @jeandelavarene this is not a normal practice in OSS development. (For example, I don't change the Oracle copyright headers of files in the Jakarta Persistence project when I make contributions.) If Oracle wants to add foreign copyright headers to Hibernate source code, then that's something we'll need to discuss, and I need you to understand going into that discussion that it would be highly irregular and we simply might not agree to it.

Choose a reason for hiding this comment

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

@ejannett please add the Oracle Copyright to all files you modify:
Copyright © 2025, Oracle and/or its affiliates.

@yrodiere
Copy link
Member

yrodiere commented Jun 5, 2025

Hey @ejannett @jeandelavarene , as discussed offline, there is now an AUTHORS.txt file. Could you please rebase, add Oracle to AUTHORS.txt, and remove any change to file headers (if any)?

We'll probably change/remove the headers at some point, but AFAIU this is not absolutely required for your contribution.

Thanks again for your work and your help.

ejannett and others added 28 commits June 6, 2025 11:59
         removed some unchecked cast warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants