Add profile for Hibernate 7 stable previews.

This commit is contained in:
Oliver Drotbohm
2024-08-06 13:20:42 +02:00
parent 0e4f488a79
commit c5b6e9fd69
2 changed files with 25 additions and 6 deletions

17
pom.xml
View File

@@ -35,6 +35,7 @@
<hibernate-65-snapshots>6.5.3-SNAPSHOT</hibernate-65-snapshots>
<hibernate-66>6.6.0.CR1</hibernate-66>
<hibernate-66-snapshots>6.6.0-SNAPSHOT</hibernate-66-snapshots>
<hibernate-70>7.0.0.Beta1</hibernate-70>
<hibernate-70-snapshots>7.0.0-SNAPSHOT</hibernate-70-snapshots>
<hsqldb>2.7.1</hsqldb>
<h2>2.2.220</h2>
@@ -107,6 +108,22 @@
</repository>
</repositories>
</profile>
<profile>
<id>hibernate-70</id>
<properties>
<hibernate>${hibernate-70}</hibernate>
<jakarta-persistence-api>3.2.0-M2</jakarta-persistence-api>
</properties>
<repositories>
<repository>
<id>sonatype-oss</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
</profile>
<profile>
<id>hibernate-70-snapshots</id>
<properties>

View File

@@ -30,7 +30,7 @@ import java.util.Properties;
import javax.sql.DataSource;
import org.hibernate.dialect.MySQL8Dialect;
import org.hibernate.dialect.MySQLDialect;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
@@ -149,8 +149,7 @@ class MySqlStoredProcedureIntegrationTests {
resultClasses = Employee.class)
public static class Employee {
@Id
@GeneratedValue //
@Id @GeneratedValue //
private Integer id;
private String name;
@@ -181,10 +180,12 @@ class MySqlStoredProcedureIntegrationTests {
@Override
public boolean equals(Object o) {
if (this == o)
if (this == o) {
return true;
if (o == null || getClass() != o.getClass())
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Employee employee = (Employee) o;
return Objects.equals(id, employee.id) && Objects.equals(name, employee.name);
}
@@ -194,6 +195,7 @@ class MySqlStoredProcedureIntegrationTests {
return Objects.hash(id, name);
}
@Override
public String toString() {
return "MySqlStoredProcedureIntegrationTests.Employee(id=" + this.getId() + ", name=" + this.getName() + ")";
}
@@ -265,7 +267,7 @@ class MySqlStoredProcedureIntegrationTests {
Properties properties = new Properties();
properties.setProperty("hibernate.hbm2ddl.auto", "create");
properties.setProperty("hibernate.dialect", MySQL8Dialect.class.getCanonicalName());
properties.setProperty("hibernate.dialect", MySQLDialect.class.getCanonicalName());
factoryBean.setJpaProperties(properties);
return factoryBean;