DATACMNS-166 - Adapted changes in Spring Data Commons.
This commit is contained in:
@@ -84,7 +84,7 @@ public class JpaRepositoryFactory extends RepositoryFactorySupport {
|
||||
EntityManager entityManager) {
|
||||
|
||||
Class<?> repositoryInterface = metadata.getRepositoryInterface();
|
||||
JpaEntityInformation<?, Serializable> entityInformation = getEntityInformation(metadata.getDomainClass());
|
||||
JpaEntityInformation<?, Serializable> entityInformation = getEntityInformation(metadata.getDomainType());
|
||||
|
||||
SimpleJpaRepository<?, ?> repo = isQueryDslExecutor(repositoryInterface) ? new QueryDslJpaRepository(
|
||||
entityInformation, entityManager) : new SimpleJpaRepository(entityInformation, entityManager);
|
||||
|
||||
@@ -53,7 +53,7 @@ public class CustomGenericJpaRepositoryFactory extends JpaRepositoryFactory {
|
||||
protected JpaRepository<?, ?> getTargetRepository(RepositoryMetadata metadata, EntityManager em) {
|
||||
|
||||
JpaEntityInformation<Object, Serializable> entityMetadata = mock(JpaEntityInformation.class);
|
||||
when(entityMetadata.getJavaType()).thenReturn((Class<Object>) metadata.getDomainClass());
|
||||
when(entityMetadata.getJavaType()).thenReturn((Class<Object>) metadata.getDomainType());
|
||||
return new CustomGenericJpaRepository<Object, Serializable>(entityMetadata, em);
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ public class NamedQueryUnitTests {
|
||||
public void setUp() throws SecurityException, NoSuchMethodException {
|
||||
|
||||
method = SampleRepository.class.getMethod("foo", Pageable.class);
|
||||
when(metadata.getDomainClass()).thenReturn((Class) String.class);
|
||||
when(metadata.getDomainType()).thenReturn((Class) String.class);
|
||||
when(metadata.getReturnedDomainClass(method)).thenReturn((Class) String.class);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user