Skip to content
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

Default array mapping doesn't work for Oracle #1818

Open
DavideD opened this issue Dec 14, 2023 · 6 comments
Open

Default array mapping doesn't work for Oracle #1818

DavideD opened this issue Dec 14, 2023 · 6 comments
Labels
waiting We are waiting for another PR or issue to be solved before merging this one

Comments

@DavideD
Copy link
Member

DavideD commented Dec 14, 2023

For Oracle, Hibernate ORM define custom types to map arrays.
We can create the same types with Vert.x SQL client but when we try an insert we have an exception.

Vert.x doesn't support user types at the moment: eclipse-vertx/vertx-sql-client#1392

We test arrays in JavaTypesArrayTest

We've created a PR for Vert.x that should be able to help us fix this issue, but we are waiting for the team to review it.

@DavideD DavideD added the waiting We are waiting for another PR or issue to be solved before merging this one label Dec 14, 2023
@DavideD
Copy link
Member Author

DavideD commented Jan 17, 2024

I don't think it's the right approach, but we should check if this solution is doable and solve the issue.

@blafond
Copy link
Member

blafond commented Feb 7, 2024

@DavideD debugged array test with Oracle DB today. The ResultSetAdapter ends up finding a ReactiveOracleArrayJdbcType instance but isn't processing it completely, so I'm hoping it isn't a big fix.

@DavideD
Copy link
Member Author

DavideD commented Feb 8, 2024

@blafond
Copy link
Member

blafond commented Feb 13, 2024

@DavideD ORM's OracleArrayJdbcType utilizes the actual Oracle connection & driver which calls OracleConnection.createOracleArray() interface into Oracle's PhysicalConnection.createOracleArray()

Vertx connection framework only implements it's own connection hierarchy ending up with an OraclePool and OracleConnection interfaces that don't do much except managing connection and facilitating queries and results.

I'm not finding a path to get the actual DB connection through Vertx... which I wouldn't expect I guess.

@blafond
Copy link
Member

blafond commented Feb 13, 2024

note that ReactiveOracleArrayJdbcType.getArray(...) is the proper place to convert the array. I was able to get a vertx OracleConnection however there were no methods to help us.

@DavideD
Copy link
Member Author

DavideD commented Feb 14, 2024

OracleConnection however there were no methods to help us.

What do you mean? This is the method we need to call: https://docs.oracle.com/en/database/oracle/oracle-database/21/jajdb/oracle/jdbc/OracleConnection.html#createARRAY_java_lang_String_java_lang_Object_

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting We are waiting for another PR or issue to be solved before merging this one
Projects
None yet
Development

No branches or pull requests

2 participants