diff --git a/pom.xml b/pom.xml
index 4ad32f28e..7a91444ff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -47,6 +47,12 @@
true
+
+ spring51-next
+
+ true
+
+
hibernate-41
diff --git a/src/test/java/org/springframework/data/jpa/repository/EclipseLinkNamespaceUserRepositoryTests.java b/src/test/java/org/springframework/data/jpa/repository/EclipseLinkNamespaceUserRepositoryTests.java
index eec35566f..beb39c3b0 100644
--- a/src/test/java/org/springframework/data/jpa/repository/EclipseLinkNamespaceUserRepositoryTests.java
+++ b/src/test/java/org/springframework/data/jpa/repository/EclipseLinkNamespaceUserRepositoryTests.java
@@ -102,6 +102,12 @@ public class EclipseLinkNamespaceUserRepositoryTests extends NamespaceUserReposi
@Override
public void supportsProjectionsWithNativeQueriesAndCamelCaseProperty() {}
+ /**
+ * Ignored until https://bugs.eclipse.org/bugs/show_bug.cgi?id=525319 is fixed.
+ */
+ @Override
+ public void supportsProjectionsWithNativeQueries() {}
+
/**
* Ignored until https://bugs.eclipse.org/bugs/show_bug.cgi?id=525319 is fixed.
*/
diff --git a/src/test/java/org/springframework/data/jpa/repository/OpenJpaNamespaceUserRepositoryTests.java b/src/test/java/org/springframework/data/jpa/repository/OpenJpaNamespaceUserRepositoryTests.java
index d0413d8f0..f1025ab17 100644
--- a/src/test/java/org/springframework/data/jpa/repository/OpenJpaNamespaceUserRepositoryTests.java
+++ b/src/test/java/org/springframework/data/jpa/repository/OpenJpaNamespaceUserRepositoryTests.java
@@ -15,7 +15,7 @@
*/
package org.springframework.data.jpa.repository;
-import static org.hamcrest.CoreMatchers.*;
+import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.*;
@@ -98,10 +98,9 @@ public class OpenJpaNamespaceUserRepositoryTests extends NamespaceUserRepository
@Override
public void shouldFindUsersInNativeQueryWithPagination() {}
-
/**
- * OpenJpa doesn't provide the correct values in the version referenced in this branch.
- * Since the problem is already gone in the version referenced in master no bug was created.
+ * OpenJpa doesn't provide the correct values in the version referenced in this branch. Since the problem is already
+ * gone in the version referenced in master no bug was created.
*/
@Override
@Test // DATAJPA-1172
@@ -110,4 +109,28 @@ public class OpenJpaNamespaceUserRepositoryTests extends NamespaceUserRepository
Query query = em.createNativeQuery("select 1 from User where firstname=? and lastname=?");
assertThat(query.getParameters().size(), equalTo(0));
}
+
+ /**
+ * ignored since OpenJPA doesn't support tuples
+ */
+ @Override
+ public void returnsNullValueInMap() {}
+
+ /**
+ * ignored since OpenJPA doesn't support tuples
+ */
+ @Override
+ public void supportsProjectionsWithNativeQueriesAndCamelCaseProperty() throws Exception {}
+
+ /**
+ * ignored since OpenJPA doesn't support tuples
+ */
+ @Override
+ public void bindsNativeQueryResultsToProjectionByName() {}
+
+ /**
+ * ignored since OpenJPA doesn't support tuples
+ */
+ @Override
+ public void supportsProjectionsWithNativeQueries() {}
}
diff --git a/src/test/java/org/springframework/data/jpa/repository/cdi/EntityManagerFactoryProducer.java b/src/test/java/org/springframework/data/jpa/repository/cdi/EntityManagerFactoryProducer.java
index d91969875..618ff675d 100644
--- a/src/test/java/org/springframework/data/jpa/repository/cdi/EntityManagerFactoryProducer.java
+++ b/src/test/java/org/springframework/data/jpa/repository/cdi/EntityManagerFactoryProducer.java
@@ -21,6 +21,8 @@ import javax.enterprise.inject.Produces;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
+import org.hibernate.Version;
+
/**
* Produces and {@link EntityManagerFactory}.
*
@@ -32,7 +34,7 @@ class EntityManagerFactoryProducer {
@Produces
@ApplicationScoped
public EntityManagerFactory createEntityManagerFactory() {
- return Persistence.createEntityManagerFactory("cdi");
+ return Persistence.createEntityManagerFactory(Version.getVersionString().startsWith("5.") ? "cdi-5x" : "cdi");
}
public void close(@Disposes EntityManagerFactory entityManagerFactory) {
diff --git a/src/test/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformationIntegrationTests.java b/src/test/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformationIntegrationTests.java
index c7aa591c8..70e8393ae 100644
--- a/src/test/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformationIntegrationTests.java
+++ b/src/test/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformationIntegrationTests.java
@@ -25,38 +25,15 @@ import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
-import javax.persistence.Access;
-import javax.persistence.AccessType;
-import javax.persistence.Entity;
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.Id;
-import javax.persistence.IdClass;
-import javax.persistence.ManyToOne;
-import javax.persistence.MappedSuperclass;
-import javax.persistence.Persistence;
-import javax.persistence.PersistenceContext;
+import javax.persistence.*;
import javax.persistence.metamodel.Metamodel;
+import org.hibernate.Version;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.data.jpa.domain.AbstractPersistable;
-import org.springframework.data.jpa.domain.sample.ConcreteType1;
-import org.springframework.data.jpa.domain.sample.Item;
-import org.springframework.data.jpa.domain.sample.ItemId;
-import org.springframework.data.jpa.domain.sample.ItemSite;
-import org.springframework.data.jpa.domain.sample.ItemSiteId;
-import org.springframework.data.jpa.domain.sample.PersistableWithIdClass;
-import org.springframework.data.jpa.domain.sample.PersistableWithIdClassPK;
-import org.springframework.data.jpa.domain.sample.PrimitiveVersionProperty;
-import org.springframework.data.jpa.domain.sample.Role;
-import org.springframework.data.jpa.domain.sample.SampleWithIdClass;
-import org.springframework.data.jpa.domain.sample.SampleWithPrimitiveId;
-import org.springframework.data.jpa.domain.sample.SampleWithTimestampVersion;
-import org.springframework.data.jpa.domain.sample.Site;
-import org.springframework.data.jpa.domain.sample.User;
-import org.springframework.data.jpa.domain.sample.VersionedUser;
+import org.springframework.data.jpa.domain.sample.*;
import org.springframework.data.repository.core.EntityInformation;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -310,7 +287,7 @@ public class JpaMetamodelEntityInformationIntegrationTests {
}
protected String getMetadadataPersitenceUnitName() {
- return "metadata";
+ return Version.getVersionString().startsWith("5.") ? "metadata-5x": "metadata";
}
@SuppressWarnings("serial")
diff --git a/src/test/resources/META-INF/persistence.xml b/src/test/resources/META-INF/persistence.xml
index e77aa9522..dfedb0b6d 100644
--- a/src/test/resources/META-INF/persistence.xml
+++ b/src/test/resources/META-INF/persistence.xml
@@ -72,7 +72,7 @@
-
+
org.hibernate.jpa.HibernatePersistenceProvider
org.springframework.data.jpa.domain.sample.MailMessage
org.springframework.data.jpa.domain.sample.MailSender
@@ -120,7 +120,7 @@
-
+
org.hibernate.jpa.HibernatePersistenceProvider
org.springframework.data.jpa.domain.sample.CustomAbstractPersistable
org.springframework.data.jpa.domain.sample.MailMessage