-
Notifications
You must be signed in to change notification settings - Fork 3.6k
HHH-14985 H2Dialect does not work properly with h2 2.0.202 on inserts #4524
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
Conversation
From which version of h2 is this change necessary? |
works with H2 1.3.176 |
What i'm saying is that it should be written so that it checks the version number and adapts to the version of h2. |
The change is necessary for all H2 2.0.x versions, i.e. starting at H2 2.0.202 |
OK, great, then @froque would you please make the change to this PR to reflect that? Do you understand what I'm asking? |
Attempt to insert |
Ah, OK, then that's different. |
hibernate-core/src/test/java/org/hibernate/orm/test/dialect/H2DialectTestCase.java
Outdated
Show resolved
Hide resolved
Just for information: In Regular mode H2 2.0 provides only two normal ways to query what was actually inserted:
Few compatibility modes provide additional legacy functions for identity columns. It looks like In 1.4.196 and older versions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for information:
getIdentitySelectString()
isn't compatible with H2 2.0
If java.sql.DatabaseMetaData#supportsGetGeneratedKeys
returns true
, which it does, it will use JDBC getGeneratedKeys
, so this should be fine.
Changes look good. IMO we can merge this.
I think |
Right, could be. But it's also unclear if it's actually better than using |
Also, I mean, the Hibernate test suite doesn't run at all on H2 2. Many test failures. No idea if lots of things are broken or just one big thing. |
Data change delta tables are supported since H2 1.4.200, but they have some issues in this outdated version. They were resolved in H2 2.0.202.
|
Possibly many. It looks like Hibernate can't find indexes any more, it needs to use different queries for H2 2.0 and 1.*. |
Thanks! |
can be changed backed when hibernate/hibernate-orm#4524 is on Hibernate 5.6.x
can be changed backed when hibernate/hibernate-orm#4524 is on Hibernate 5.6.x
* updated h2 to 2.0.206; fixes CVE-2021-42392 vulnerability * explicit column mapping in order to support updated h2 * added h2 column type * delegate create, drop and update to CommonSchemaManager * explicit column mapping in order to support updated h2 * added h2 column type * explicit column mapping in order to support updated h2 * changed GenerationType to AUTO can be changed backed when hibernate/hibernate-orm#4524 is on Hibernate 5.6.x
This should be cherry picked into Hibernate 5.x