diff --git a/src/test/java/org/springframework/data/repository/query/parser/PartTreeUnitTests.java b/src/test/java/org/springframework/data/repository/query/parser/PartTreeUnitTests.java index ea2eb3552..5cfc8a5d9 100644 --- a/src/test/java/org/springframework/data/repository/query/parser/PartTreeUnitTests.java +++ b/src/test/java/org/springframework/data/repository/query/parser/PartTreeUnitTests.java @@ -349,6 +349,14 @@ public class PartTreeUnitTests { assertThat(tree.isDistinct(), is(true)); } + /** + * @see DATAJPA-324 + */ + @Test + public void resolvesPropertyPathFromGettersOnInterfaces() { + assertThat(new PartTree("findByCategoryId", Product.class), is(notNullValue())); + } + private static void assertType(Iterable sources, Type type, String property) { assertType(sources, type, property, 1, true); } @@ -427,4 +435,14 @@ public class PartTreeUnitTests { String øre; String år; } + + interface Product { + + Category getCategory(); + } + + interface Category { + + Long getId(); + } }