DATAJPA-1207 - Polishing.
Use PersistenceUtil.isLoaded(entity, attributeName) to avoid potential early proxy resolution by using the getter. Also ignore the now (expected) failing tests in EclipseLink and add reference to open issue. Original Pull Request: #229
This commit is contained in:
@@ -27,27 +27,35 @@ import org.springframework.test.context.ContextConfiguration;
|
||||
public class EclipseLinkEntityGraphRepositoryMethodsIntegrationTests
|
||||
extends EntityGraphRepositoryMethodsIntegrationTests {
|
||||
|
||||
@Ignore
|
||||
@Ignore("Bug 510627 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=510627")
|
||||
@Test
|
||||
public void shouldRespectNamedEntitySubGraph() {}
|
||||
|
||||
@Ignore
|
||||
@Ignore("Bug 510627 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=510627")
|
||||
@Test
|
||||
public void shouldRespectMultipleSubGraphForSameAttributeWithDynamicFetchGraph() {}
|
||||
|
||||
@Ignore
|
||||
@Ignore("Bug 510627 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=510627")
|
||||
@Test
|
||||
public void shouldRespectDynamicFetchGraphForGetOneWithAttributeNamesById() {}
|
||||
|
||||
@Ignore
|
||||
@Ignore("Bug 510627 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=510627")
|
||||
@Test
|
||||
public void shouldRespectConfiguredJpaEntityGraphWithPaginationAndQueryDslPredicates() {}
|
||||
|
||||
@Ignore("Bug 510627 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=510627")
|
||||
@Test
|
||||
public void shouldRespectConfiguredJpaEntityGraphWithPaginationAndSpecification() {}
|
||||
|
||||
@Ignore("Bug 510627 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=510627")
|
||||
@Test
|
||||
public void shouldCreateDynamicGraphWithMultipleLevelsOfSubgraphs() {}
|
||||
|
||||
@Ignore
|
||||
@Ignore("Bug 510627 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=510627")
|
||||
@Test
|
||||
public void shouldRespectConfiguredJpaEntityGraphInFindOne() {}
|
||||
|
||||
@Ignore
|
||||
@Ignore("Bug 510627 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=510627")
|
||||
@Test
|
||||
public void shouldRespectInferFetchGraphFromMethodName() {}
|
||||
}
|
||||
|
||||
@@ -96,6 +96,7 @@ public class EntityGraphRepositoryMethodsIntegrationTests {
|
||||
public void shouldRespectConfiguredJpaEntityGraph() {
|
||||
|
||||
Assume.assumeTrue(currentEntityManagerIsAJpa21EntityManager(em));
|
||||
|
||||
em.flush();
|
||||
em.clear();
|
||||
|
||||
@@ -110,6 +111,7 @@ public class EntityGraphRepositoryMethodsIntegrationTests {
|
||||
public void shouldRespectConfiguredJpaEntityGraphInFindOne() {
|
||||
|
||||
Assume.assumeTrue(currentEntityManagerIsAJpa21EntityManager(em));
|
||||
|
||||
em.flush();
|
||||
em.clear();
|
||||
|
||||
@@ -125,6 +127,7 @@ public class EntityGraphRepositoryMethodsIntegrationTests {
|
||||
public void shouldRespectInferFetchGraphFromMethodName() {
|
||||
|
||||
Assume.assumeTrue(currentEntityManagerIsAJpa21EntityManager(em));
|
||||
|
||||
em.flush();
|
||||
em.clear();
|
||||
|
||||
@@ -140,6 +143,7 @@ public class EntityGraphRepositoryMethodsIntegrationTests {
|
||||
public void shouldRespectDynamicFetchGraphForGetOneWithAttributeNamesById() {
|
||||
|
||||
Assume.assumeTrue(currentEntityManagerIsAJpa21EntityManager(em));
|
||||
|
||||
em.flush();
|
||||
em.clear();
|
||||
|
||||
@@ -165,6 +169,7 @@ public class EntityGraphRepositoryMethodsIntegrationTests {
|
||||
public void shouldRespectConfiguredJpaEntityGraphWithPaginationAndQueryDslPredicates() {
|
||||
|
||||
Assume.assumeTrue(currentEntityManagerIsAJpa21EntityManager(em));
|
||||
|
||||
em.flush();
|
||||
em.clear();
|
||||
|
||||
@@ -172,7 +177,7 @@ public class EntityGraphRepositoryMethodsIntegrationTests {
|
||||
List<User> result = page.getContent();
|
||||
|
||||
assertThat(result.size()).isEqualTo(3);
|
||||
assertThat(util.isLoaded(result.get(0).getRoles())).isTrue();
|
||||
assertThat(util.isLoaded(result.get(0), "roles")).isTrue();
|
||||
assertThat(result.get(0)).isEqualTo(tom);
|
||||
}
|
||||
|
||||
@@ -180,6 +185,7 @@ public class EntityGraphRepositoryMethodsIntegrationTests {
|
||||
public void shouldRespectConfiguredJpaEntityGraphWithPaginationAndSpecification() {
|
||||
|
||||
Assume.assumeTrue(currentEntityManagerIsAJpa21EntityManager(em));
|
||||
|
||||
em.flush();
|
||||
em.clear();
|
||||
|
||||
@@ -191,7 +197,7 @@ public class EntityGraphRepositoryMethodsIntegrationTests {
|
||||
List<User> result = page.getContent();
|
||||
|
||||
assertThat(result.size()).isEqualTo(3);
|
||||
assertThat(util.isLoaded(result.get(0).getRoles())).isTrue();
|
||||
assertThat(util.isLoaded(result.get(0), "roles")).isTrue();
|
||||
assertThat(result.get(0)).isEqualTo(tom);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user