Created
August 27, 2013 11:43
-
-
Save thomasdarimont/6352513 to your computer and use it in GitHub Desktop.
Prototypic fix / test case for https://jira.springsource.org/browse/DATACMNS-363
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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}*+))"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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