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

Add support for H2 #929

Open
DavideD opened this issue Aug 4, 2021 · 10 comments · May be fixed by #1336
Open

Add support for H2 #929

DavideD opened this issue Aug 4, 2021 · 10 comments · May be fixed by #1336
Assignees
Labels
enhancement New feature or request

Comments

@DavideD
Copy link
Member

DavideD commented Aug 4, 2021

For testing and examples, it would be nice to have support for an in-memory database like H2.

There is actually an example in the Vert.x SQL Client documentation on how to wrap the H2 JDBC driver around the Vert.x Pool: https://vertx.io/docs/vertx-jdbc-client/java/#_using_the_sql_client_api

@DavideD DavideD changed the title Support on in-memory database Support an in-memory database (H2 for example) Aug 4, 2021
@gavinking gavinking added the enhancement New feature or request label Sep 4, 2021
blafond added a commit to blafond/hibernate-reactive that referenced this issue Mar 17, 2022
blafond added a commit to blafond/hibernate-reactive that referenced this issue Mar 18, 2022
blafond added a commit to blafond/hibernate-reactive that referenced this issue Mar 18, 2022
blafond added a commit to blafond/hibernate-reactive that referenced this issue Mar 18, 2022
@blafond blafond self-assigned this Mar 18, 2022
@cj848
Copy link

cj848 commented Mar 20, 2022

@blafond, @DavideD
Hello. I am a developer of kotlin-jdsl.
Hibernate-reactive does not officially support h2 db, so I went in after seeing the above issue and changed the settings to test internally using h2 db. I hope it will be helpful for your development.

For reference, when I run h2 db in hibernate-reactive, I have summarized the following problems and the progress to solve them.

  1. Schema generation is not possible because h2 db is not supported.
  2. There was no db pool, but VertxH2DBConnectionPoolConfiguration
    solved using code
  3. In case 1, it induces query generation using the existing hibernate-core's ddl schema generator syntax - Since h2 db itself is not supported, it is modified to operate in mysql mode.

please note. We expect to support H2 DB quickly.
I tried to contribute, but it was a lot more work than I expected, so I'm sharing the difficulties I've been through.

Thank you for making such a good library, I'm using it well.

@DavideD
Copy link
Member Author

DavideD commented Mar 20, 2022

Thanks @cj848, we are currently working on it. Not sure at the moment how long is gonna take to support h2 because we often need some additional work to make the Hibernate ORM Dialect works with the Vert.x driver. We might be able have something working (with some limitations) in the next couple of weeks.

Anyway, people seems very interested to this feature so we will try to keep it up to date.

Cheers

@cj848
Copy link

cj848 commented Mar 20, 2022

@DavideD
Thank you for your interest.
I am using this library in a reactive module inside a library called kotlin-jdsl as in the link in the previous comment. I am very grateful that I can use reactive while using the features of JPA as it is. All of the hibernate-reactive contributors worked hard in the development. thank you

@DavideD DavideD changed the title Support an in-memory database (H2 for example) Add support for H2 Mar 21, 2022
blafond added a commit to blafond/hibernate-reactive that referenced this issue Mar 22, 2022
blafond added a commit to blafond/hibernate-reactive that referenced this issue Mar 22, 2022
blafond added a commit to blafond/hibernate-reactive that referenced this issue Mar 22, 2022
blafond added a commit to blafond/hibernate-reactive that referenced this issue Mar 25, 2022
blafond added a commit to blafond/hibernate-reactive that referenced this issue Mar 25, 2022
DavideD pushed a commit to DavideD/hibernate-reactive that referenced this issue Mar 28, 2022
DavideD pushed a commit to DavideD/hibernate-reactive that referenced this issue Mar 28, 2022
DavideD pushed a commit to DavideD/hibernate-reactive that referenced this issue Mar 28, 2022
DavideD pushed a commit to DavideD/hibernate-reactive that referenced this issue Mar 28, 2022
DavideD pushed a commit to DavideD/hibernate-reactive that referenced this issue Mar 28, 2022
blafond added a commit to blafond/hibernate-reactive that referenced this issue Mar 29, 2022
blafond added a commit to blafond/hibernate-reactive that referenced this issue Mar 29, 2022
blafond added a commit to blafond/hibernate-reactive that referenced this issue Mar 29, 2022
blafond added a commit to blafond/hibernate-reactive that referenced this issue Mar 29, 2022
blafond added a commit to blafond/hibernate-reactive that referenced this issue Mar 30, 2022
blafond added a commit to blafond/hibernate-reactive that referenced this issue Mar 31, 2022
blafond added a commit to blafond/hibernate-reactive that referenced this issue Mar 31, 2022
DavideD pushed a commit to DavideD/hibernate-reactive that referenced this issue Jun 14, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 14, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 14, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 14, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 14, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 14, 2022
MySQL always returns an id of type Long.
This commit changes an hack that was affecting all dbs
and preventing H2 to read identity id of type Integer or Short
DavideD pushed a commit to DavideD/hibernate-reactive that referenced this issue Jun 14, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 14, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 14, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 14, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 14, 2022
@DavideD
Copy link
Member Author

DavideD commented Jun 14, 2022

We stopped working on this one because the results were unstable. When we have time we should have another look at it

It turns out that I'm not very smart and didn't realize that we were using the wron URL. The current PR looks promising: #1336

DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 14, 2022
MySQL always returns an id of type Long.
This commit changes an hack that was affecting all dbs
and preventing H2 to read identity id of type Integer or Short
DavideD pushed a commit to DavideD/hibernate-reactive that referenced this issue Jun 14, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 14, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 14, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 14, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 14, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 22, 2022
MySQL always returns an id of type Long.
This commit changes an hack that was affecting all dbs
and preventing H2 to read identity id of type Integer or Short
DavideD pushed a commit to DavideD/hibernate-reactive that referenced this issue Jun 22, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 22, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 22, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 22, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 22, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 22, 2022
MySQL always returns an id of type Long.
This commit changes an hack that was affecting all dbs
and preventing H2 to read identity id of type Integer or Short
DavideD pushed a commit to DavideD/hibernate-reactive that referenced this issue Jun 22, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 22, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 22, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 22, 2022
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants