-
Notifications
You must be signed in to change notification settings - Fork 40.4k
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
Consider upgrade to Hibernate ORM 5.2 #6111
Comments
A lot of things have changed between 5.1 and 5.2 (Java 8 minimum requirement being the most concerning). Ideally it would be good to get this into Spring Boot 1.4 as people will be upgrading from Hibernate 4.x and it would be nice to get all the pain out of the way in one hit. |
Are we raising the bar for spring boot too? |
@rakpan Not until Spring Boot 2.0. However, we could still consider Hibernate 5.2 as our default choice as long as people can easily downgrade. |
Considering that @philwebb I had a quick look and the "as long as people can easily downgrade" does not seem possible at the moment. I've raised HHH-10823 |
@snicoll Unless I'm missing something, I'm not sure I agree. Users might not be able to downgrade with a single property but they could set the property and add back |
Yes. I don't consider that as "easy". |
@snicoll It's not super easy, but it's not that hard and it's probably less confusing that having an empty |
My approach to use hibernate 5.2 right now would be
|
Spring Framework 4.3.0.RELEASE isn't fully compatible with Hibernate 5.1 (see SPR-14365) so we either need to move to 5.2 or wait for Spring Framework 4.3.1.RELEASE. |
Indeed, that probably means that our RC1 has to wait for |
Fixed in 2ff9e3c |
I'd 👍 not for "requiring" 5.2 but at least allowing people to use Hibernate 5.2 if they want.
While I'm ok with Spring Boot not defaulting to Hibernate 5.2, it concerns me that users can't use Hibernate 5.2 or even 5.3. |
@ceefour this issue is closed. If you believe you have found an issue in Spring Boot, please create a dedicated issue. Before you do, try your app without |
@snicoll We have no issue with Hibernate 4.2 and Hibernate 5.0 (both Spring Boot 1.3.6 and 1.4.0), just Boot 1.4.0 (Spring v4.3.2.RELEASE) with Hibernate 5.2.1.Final. Removing hibernate-spatial doesn't remove the problem. Should I file the issue on Spring-boot or JIRA Spring ORM ? Spring 4.3 claims it supports Hibernate 4.2 (https://jira.spring.io/browse/SPR-14327) so I'm not sure whether this is Boot's or Spring's... |
Sorry, I mixed up. I meant |
Thanks @snicoll , I've found the issue. It's had I still loaded <dependency>
<groupId>org.jadira.usertype</groupId>
<artifactId>usertype.core</artifactId>
<version>5.0.0.GA</version>
<!-- usertype 5.0.0 not yet compatible with Hibernate 5.2: https://github.com/JadiraOrg/jadira/pull/57 -->
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<!-- hibernate-entitymanager must be excluded: https://github.com/spring-projects/spring-boot/issues/6111#issuecomment-225074425 -->
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
</exclusion>
</exclusions>
</dependency> However, usertype's compatibility with Hibernate 5.2 is another issue (JadiraOrg/jadira#57). It's nice that the Spring Boot documentation has been updated to refer to the Hibernate 5.2 sample, however I'd say it's a good idea to signify in the documentation that especially the exclusion of hibernate-entitymanager is strictly required. The Hibernate 5.2 sample's pom.xml has no information at all on why hibernate-entitymanager was excluded. So users can be frustrated for some time before finding this page which explains the background of issue. |
@ceefour could you please stop commenting on closed issues please? |
@snicoll Sorry, this would be my last comment on this thread. I did the comment because this page is high on Google, so if someone else is having the same problem as I am, I hope that by commenting, it can lead them to the solution (instead of being even more confused, as it was in my case). It happens a lot to me, and I'm thankful for people "leaving a trail" of problem solving. I know this is not StackOverflow though, I'm sorry. |
Hibernate 5.2 is now GA and it might be nice to upgrade as part of Spring Boot 1.4.
The text was updated successfully, but these errors were encountered: