From 5bb1b8b77c0352861e9095de62f5c77fc2cda4c1 Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Sat, 4 Jun 2016 14:24:46 +0200 Subject: [PATCH] #195 - Make JPA examples work with Hibernate 5.2. Upgrade to Hibernate 5.2.1 and Spring Framework 4.3 to pull in the necessary tweaks to let the latter work with the former. Excluded hibernate-entitymanager and refer to hibernate-core instead as the 5.2 release has merged the artifacts and the former is not available anymore. The project showing the stored procedure support still needs to stay on Hibernate 5.0.7 because the stored procedure support on HSQLDB has been broken since 5.0.8. The original issue [0] has been fixed but running the module on 5.2.1 now runs into a NullPointerException from AbstractProducedQuery [1]. [0] https://hibernate.atlassian.net/browse/HHH-10515 [1] https://hibernate.atlassian.net/browse/HHH-10915 --- .../custom/UserRepositoryCustomizationTests.java | 2 +- jpa/jpa21/pom.xml | 7 +++++++ jpa/pom.xml | 14 +++++++++++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/jpa/example/src/test/java/example/springdata/jpa/custom/UserRepositoryCustomizationTests.java b/jpa/example/src/test/java/example/springdata/jpa/custom/UserRepositoryCustomizationTests.java index 930bfeb2..e7900ffd 100644 --- a/jpa/example/src/test/java/example/springdata/jpa/custom/UserRepositoryCustomizationTests.java +++ b/jpa/example/src/test/java/example/springdata/jpa/custom/UserRepositoryCustomizationTests.java @@ -27,7 +27,7 @@ import org.springframework.test.context.junit4.SpringRunner; import org.springframework.transaction.annotation.Transactional; /** - * Intergration test showing the basic usage of {@link UserRepository}. + * Integration test showing the basic usage of {@link UserRepository}. * * @author Oliver Gierke * @author Thomas Darimont diff --git a/jpa/jpa21/pom.xml b/jpa/jpa21/pom.xml index b9d785aa..1bab6e6f 100644 --- a/jpa/jpa21/pom.xml +++ b/jpa/jpa21/pom.xml @@ -16,4 +16,11 @@ 5.0.7.Final + + + org.hibernate + hibernate-entitymanager + + + \ No newline at end of file diff --git a/jpa/pom.xml b/jpa/pom.xml index 853b8f68..07e29796 100644 --- a/jpa/pom.xml +++ b/jpa/pom.xml @@ -29,7 +29,8 @@ - Ingalls-BUILD-SNAPSHOT + 5.2.1.Final + 4.3.0.RELEASE @@ -37,6 +38,17 @@ org.springframework.boot spring-boot-starter-data-jpa + + + org.hibernate + hibernate-entitymanager + + + + + + org.hibernate + hibernate-core