-
Notifications
You must be signed in to change notification settings - Fork 46
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
Custom driver name disables hibernate support of advanced postgres types #370
Comments
Hi @maciejwo-papayaglobal, thank you for raising this issue. We are currently working on a solution for this, we will keep you posted on our progress. |
Hi @maciejwo-papayaglobal, we merged #371 which introduces a new connection plugin allowing user applications to override the driver name. Here is an example on how the plugin can be used: https://github.com/awslabs/aws-advanced-jdbc-wrapper/blob/main/examples/AWSDriverExample/src/main/java/software/amazon/DriverMetaDataConnectionPluginExample.java Can you please check out our snapshot build and let us know if the issue persists? Thank you. |
@karenc-bq it works, thank you! Sorry for late reply, I didn't expect it to be acted upon so quickly 😅 A minor question: as is, there's no way to passthrough the driver name from the underlying driver, only explicit value can be set. Would it be ok to do passthrough if the Regardless of the passthrough, thank you very much for help! ❤️ |
Hi @maciejwo-papayaglobal, please feel free to create a PR for your proposed changes. We appreciate your help! Thank you. |
Thanks @karenc-bq! I'll prepare a PR, in the mean time, this issue is resolved, thank you very much for help! ❤️ |
Describe the feature
For postgres-like databases, Hibernate ORM uses driver name obtained via
DatabaseMetaData::getDriverName
to determine driver kind, which affects the way advanced types are handled. Would id be possible to allow passthrough of the underlying driver name in certain situations?https://github.com/hibernate/hibernate-orm/blob/main/hibernate-core/src/main/java/org/hibernate/dialect/PostgreSQLDriverKind.java#L27
https://github.com/hibernate/hibernate-orm/blob/6.2/hibernate-core/src/main/java/org/hibernate/dialect/PostgreSQLDialect.java#L1342
Use Case
I'd like to be able to configure wrapped driver to use original driver name, so that hibernate correctly recognises it and enables native support for advanced types.
Proposed Solution
Perhaps an additional property could be defined to enable driver-name passthrough from the wrapped driver?
Other Information
No response
Acknowledgements
The AWS Advanced JDBC Driver version used
1.0.1
JDK version used
Temurin-17.0.6+10
Operating System and version
macOS 13.2.1
The text was updated successfully, but these errors were encountered: