Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Prototypic fix / test case for https://jira.springsource.org/browse/DATACMNS-363
//In org.springframework.data.repository.query.parser.
private static final Pattern PREFIX_TEMPLATE = Pattern
.compile("^(find|read|get|count)((\\p{Lu}|\\P{M}\\p{M}*+).*?)??By");
private static final String KEYWORD_TEMPLATE = "(%s)(?=(\\p{Lu}|\\P{M}\\p{M}*+))";
//In org.springframework.data.repository.query.parser.PartTreeUnitTests
/**
* @see DATACMNS-363
*/
@Test
public void supportNonLowercaseUnicodeAttributeNamesInQueryMethodNames() throws Exception {
PartTree tree = new PartTree("findBy생일And이름", DomainObjectWithSpecialChars.class);
assertPart(tree, new Part[] { new Part("생일", DomainObjectWithSpecialChars.class),
new Part("이름", DomainObjectWithSpecialChars.class) });
}
//...
class DomainObjectWithSpecialChars {
String øre;
String år;
String 생일; // Birthday
String 이름; // Name
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.