Skip to content

Commit c5b6e9f

Browse files
committed
Add profile for Hibernate 7 stable previews.
1 parent 0e4f488 commit c5b6e9f

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed

pom.xml

+17
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
<hibernate-65-snapshots>6.5.3-SNAPSHOT</hibernate-65-snapshots>
3636
<hibernate-66>6.6.0.CR1</hibernate-66>
3737
<hibernate-66-snapshots>6.6.0-SNAPSHOT</hibernate-66-snapshots>
38+
<hibernate-70>7.0.0.Beta1</hibernate-70>
3839
<hibernate-70-snapshots>7.0.0-SNAPSHOT</hibernate-70-snapshots>
3940
<hsqldb>2.7.1</hsqldb>
4041
<h2>2.2.220</h2>
@@ -107,6 +108,22 @@
107108
</repository>
108109
</repositories>
109110
</profile>
111+
<profile>
112+
<id>hibernate-70</id>
113+
<properties>
114+
<hibernate>${hibernate-70}</hibernate>
115+
<jakarta-persistence-api>3.2.0-M2</jakarta-persistence-api>
116+
</properties>
117+
<repositories>
118+
<repository>
119+
<id>sonatype-oss</id>
120+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
121+
<releases>
122+
<enabled>false</enabled>
123+
</releases>
124+
</repository>
125+
</repositories>
126+
</profile>
110127
<profile>
111128
<id>hibernate-70-snapshots</id>
112129
<properties>

spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/MySqlStoredProcedureIntegrationTests.java

+8-6
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
import javax.sql.DataSource;
3232

33-
import org.hibernate.dialect.MySQL8Dialect;
33+
import org.hibernate.dialect.MySQLDialect;
3434
import org.junit.jupiter.api.Test;
3535
import org.junit.jupiter.api.extension.ExtendWith;
3636
import org.springframework.beans.factory.annotation.Autowired;
@@ -149,8 +149,7 @@ void testEntityListFromNamedProcedure() {
149149
resultClasses = Employee.class)
150150
public static class Employee {
151151

152-
@Id
153-
@GeneratedValue //
152+
@Id @GeneratedValue //
154153
private Integer id;
155154
private String name;
156155

@@ -181,10 +180,12 @@ public void setName(String name) {
181180
@Override
182181
public boolean equals(Object o) {
183182

184-
if (this == o)
183+
if (this == o) {
185184
return true;
186-
if (o == null || getClass() != o.getClass())
185+
}
186+
if (o == null || getClass() != o.getClass()) {
187187
return false;
188+
}
188189
Employee employee = (Employee) o;
189190
return Objects.equals(id, employee.id) && Objects.equals(name, employee.name);
190191
}
@@ -194,6 +195,7 @@ public int hashCode() {
194195
return Objects.hash(id, name);
195196
}
196197

198+
@Override
197199
public String toString() {
198200
return "MySqlStoredProcedureIntegrationTests.Employee(id=" + this.getId() + ", name=" + this.getName() + ")";
199201
}
@@ -265,7 +267,7 @@ public AbstractEntityManagerFactoryBean entityManagerFactory(DataSource dataSour
265267

266268
Properties properties = new Properties();
267269
properties.setProperty("hibernate.hbm2ddl.auto", "create");
268-
properties.setProperty("hibernate.dialect", MySQL8Dialect.class.getCanonicalName());
270+
properties.setProperty("hibernate.dialect", MySQLDialect.class.getCanonicalName());
269271
factoryBean.setJpaProperties(properties);
270272

271273
return factoryBean;

0 commit comments

Comments
 (0)