DATAJPA-1484 - Add build profile for Hibernate 6.

Added build profile Hibernate 6 snapshots. Introduced property for Hibernate group identifier as it's gonna change to org.hibernate.orm in 6.0.
Added the build profile to the Travis builds. Added explicit cast to the Hibernate implementation in PersistenceProvider as ScrollableResults now uses a generic type as return value for its ….get() method.
This commit is contained in:
Oliver Drotbohm
2018-12-13 15:48:42 +01:00
parent 677debabb1
commit 270c296fd3
3 changed files with 19 additions and 3 deletions

View File

@@ -13,6 +13,7 @@ env:
- PROFILE=hibernate-53-next
- PROFILE=hibernate-54
- PROFILE=hibernate-54-next
- PROFILE=hibernate-6
- PROFILE=eclipselink-next
- PROFILE=eclipselink-27
- PROFILE=eclipselink-27-next

18
pom.xml
View File

@@ -23,6 +23,7 @@
<eclipselink>2.6.5</eclipselink>
<hibernate>5.2.17.Final</hibernate>
<hibernate.groupId>org.hibernate</hibernate.groupId>
<jpa>2.0.0</jpa>
<springdata.commons>2.0.13.BUILD-SNAPSHOT</springdata.commons>
@@ -81,6 +82,19 @@
</repository>
</repositories>
</profile>
<profile>
<id>hibernate-6-next</id>
<properties>
<hibernate>6.0.0-SNAPSHOT</hibernate>
<hibernate.groupId>org.hibernate.orm</hibernate.groupId>
</properties>
<repositories>
<repository>
<id>jboss</id>
<url>https://repository.jboss.org/nexus/content/repositories/public</url>
</repository>
</repositories>
</profile>
<profile>
<id>eclipselink-next</id>
<properties>
@@ -225,14 +239,14 @@
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<groupId>${hibernate.groupId}</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<groupId>${hibernate.groupId}</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>${hibernate}</version>
<scope>provided</scope>

View File

@@ -380,7 +380,8 @@ public enum PersistenceProvider implements QueryExtractor, ProxyIdAccessor {
throw new NoSuchElementException("No ScrollableResults");
}
Object[] row = scrollableResults.get();
// Cast needed for Hibernate 6 compatibility
Object[] row = (Object[]) scrollableResults.get();
return row.length == 1 ? row[0] : row;
}