-
Notifications
You must be signed in to change notification settings - Fork 201
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
Support for Oracle collections #1392
Comments
Thanks for bringing this up @DavideD It's not possible currently unfortunately |
@DavideD I've read about Oracle collections in https://docs.oracle.com/en/database/oracle/oracle-database/21/jjdbc/Oracle-collections.html#GUID-338038DB-AE3A-4C82-BB8F-8C87F2D130C4 It seems an |
The JDBC driver takes care of it. The class in the JDBC driver is called
At first glance, I'd say the Vert.x client needs something similar. |
Thanks for the pointer. I understand something must create an |
I'm not sure I understand, We create an |
Anyway, maybe you can show me an example that only use Vert.x and I can adapt it to Hibernate Reactive. |
The Vert.x Reactive Oracle, unlike other Vert.x Reactive SQL clients, is based on the Oracle JDBC driver and its Reactive extensions (the Oracle DB protocol is not open so we can't create our own codec). So when you execute a So yes, I think in Hibernate Reactive you need to create an OracleArray instance like in Hibernate ORM and submit it in the Tuple |
So it shouldn't be hard to delegate the creation of the array to the underlying driver by calling the
Hibernate ORM doesn't create an instance of You can see this by checking the signature of the method
|
I understand Hibernate ORM doesn't create an instance of This, is what I think should be done in Hibernate Reactive too. And then the |
@tsegismont I added a simple Oracle string array test and a backing public OracleConnection.createArray(...) method which we can access in HR to support Oracle arrays. The test, however, is failing in vertx. Can you take a look at it? Note the exception is:
|
@blafond are you creating the new type in the test? Didn't you have queries similar to the one I've included in this issue? |
Nevermind, I see that that import.sql is included. Sorry |
@blafond sure, would you mind putting together a draft PR ? |
sure! I'll do that today. thx |
This is actually a question.
In order to support the mapping of fields of array type, Hibernate ORM run some queries to create a custom type. For example, for supporting integer arrays, it runs:
With the Oracle Vert.x SQL client, I can do the same and I can create the table with the new defined type.
The problem arise when I try to insert an array in the table. I have the exception:
In the JDBC driver, there are dedicated methods for the creation of a new array and it's possible to specify the name of the custom type when setting the value in the prepared statement.
Is it possible to do something similar with the Vert.x client?
The text was updated successfully, but these errors were encountered: