Skip to content

Add support for H2 #929

@DavideD

Description

@DavideD
Member

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

Activity

changed the title [-]Support on in-memory database[/-] [+]Support an in-memory database (H2 for example)[/+] on Aug 4, 2021
added 4 commits that reference this issue on Mar 17, 2022
self-assigned this
on Mar 18, 2022
cj848

cj848 commented on Mar 20, 2022

@cj848

@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

DavideD commented on Mar 20, 2022

@DavideD
MemberAuthor

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

cj848 commented on Mar 20, 2022

@cj848

@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

changed the title [-]Support an in-memory database (H2 for example)[/-] [+]Add support for H2[/+] on Mar 21, 2022
added 3 commits that reference this issue on Mar 22, 2022

57 remaining items

added 3 commits that reference this issue on Jun 14, 2022
de4a47d
eed8d7e
cb8c33c
added 12 commits that reference this issue on Jun 22, 2022
dd649e1
15558b0
9ffbab1
148ec7c
d2b37ab
bff1835
0a4946e
4794c78
13dbccc
6ebda19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Participants

    @DavideD@blafond@gavinking@mkouba@cj848

    Issue actions

      Add support for H2 · Issue #929 · hibernate/hibernate-reactive