DATACMNS-1304 - PropertyPath now supports properties with all uppercase endings.
Original pull request: #289.
This commit is contained in:
committed by
Oliver Gierke
parent
fc2135df3d
commit
1da969db0a
@@ -44,6 +44,7 @@ import org.springframework.data.repository.query.parser.PartTree.OrPart;
|
||||
* @author Christoph Strobl
|
||||
* @author Mark Paluch
|
||||
* @author Michael Cramer
|
||||
* @author Mariusz Mączkowski
|
||||
*/
|
||||
public class PartTreeUnitTests {
|
||||
|
||||
@@ -600,6 +601,16 @@ public class PartTreeUnitTests {
|
||||
assertThat(tree.hasPredicate()).isFalse();
|
||||
}
|
||||
|
||||
@Test // DATACMNS-1304
|
||||
public void resolvesPropertyPathWithSingleUppercaseLetterPropertyEnding() {
|
||||
assertThat(new PartTree("findByCategoryBId", Product.class)).isNotNull();
|
||||
}
|
||||
|
||||
@Test // DATACMNS-1304
|
||||
public void resolvesPropertyPathWithUppercaseLettersPropertyEnding() {
|
||||
assertThat(new PartTree("findByCategoryABId", Product.class)).isNotNull();
|
||||
}
|
||||
|
||||
private static void assertLimiting(String methodName, Class<?> entityType, boolean limiting, Integer maxResults) {
|
||||
assertLimiting(methodName, entityType, limiting, maxResults, false);
|
||||
}
|
||||
@@ -723,6 +734,10 @@ public class PartTreeUnitTests {
|
||||
Anders getAnders(); // constains And keyword
|
||||
|
||||
Category getCategory();
|
||||
|
||||
Category getCategoryB(); // contains single uppercase letter at the end
|
||||
|
||||
Category getCategoryAB(); // contains uppercase letters at the end
|
||||
}
|
||||
|
||||
interface Category {
|
||||
|
||||
Reference in New Issue
Block a user