Skip to content

Commit

Permalink
DATAJPA-1484 - Add build profile for Hibernate 6.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
odrotbohm committed Dec 13, 2018
1 parent 677deba commit 270c296
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 16 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,8 @@ public Object next() {
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;
}
Expand Down

0 comments on commit 270c296

Please sign in to comment.