From 9640ea81ad947c1e3e8d8e9391a4e4442a100ffb Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Fri, 21 Jun 2013 17:48:57 +0200 Subject: [PATCH] DATAJPA-417 - Upgraded to EclipseLink 2.5.1. Was able to upgrade to EclipseLink 2.5.1 and re-enable a previously ignored integration tests. However, some of the disabled test cases still fail despite the relevant bug being reported as fixed in 2.5.1. Turned the workaround in QueryUtils into a TODO for removal as we don't want to strongly force EclipseLink users to upgrade to 2.5.x yet. --- pom.xml | 2 +- .../data/jpa/repository/query/QueryUtils.java | 6 +++--- .../EclipseLinkNamespaceUserRepositoryTests.java | 16 +--------------- 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/pom.xml b/pom.xml index d5a9a0035..569ed2ee2 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ DATAJPA - 2.4.0 + 2.5.1 3.6.10.Final 1.8.0.10 2.0.0 diff --git a/src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java b/src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java index e7f311e42..fd2e3baf2 100644 --- a/src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java +++ b/src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2013 the original author or authors. + * Copyright 2008-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -440,9 +440,9 @@ public abstract class QueryUtils { Bindable propertyPathModel = null; if (from.getModel() instanceof ManagedType) { + /* - * Avoid calling from.get(...) because this triggers the generation of an inner-join instead - * of and outer-join in eclipse-link. + * Required to keep support for EclipseLink 2.4.x. TODO: Remove once we drop that (probably Dijkstra M1) * See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=413892 */ propertyPathModel = (Bindable) ((ManagedType) from.getModel()).getAttribute(property.getSegment()); 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 72892d256..9234f430e 100644 --- a/src/test/java/org/springframework/data/jpa/repository/EclipseLinkNamespaceUserRepositoryTests.java +++ b/src/test/java/org/springframework/data/jpa/repository/EclipseLinkNamespaceUserRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2012 the original author or authors. + * Copyright 2008-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,20 +50,6 @@ public class EclipseLinkNamespaceUserRepositoryTests extends NamespaceUserReposi } - @Override - public void doesNotDropNullValuesOnPagedSpecificationExecution() {} - - /** - * Works with a workaround in QueryUtils.toExpressionRecursively(…). TODO: remove once EclipseLink bug is fixed. - * - * @see DATAJPA-346 - * @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=413892 - */ - @Override - public void shouldGenerateLeftOuterJoinInfindAllWithPaginationAndSortOnNestedPropertyPath() { - super.shouldGenerateLeftOuterJoinInfindAllWithPaginationAndSortOnNestedPropertyPath(); - } - /** * Ignored until https://bugs.eclipse.org/bugs/show_bug.cgi?id=349477 is resolved. */