From e7e9e77025cc1a460dba835239fc641af3ad2841 Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Thu, 4 Jun 2015 12:03:05 +0200 Subject: [PATCH] DATACMNS-569 - Fixed reference documentation on using underscores in property path expressions. --- src/main/asciidoc/repositories.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/asciidoc/repositories.adoc b/src/main/asciidoc/repositories.adoc index e21f5f5e7..797a54630 100644 --- a/src/main/asciidoc/repositories.adoc +++ b/src/main/asciidoc/repositories.adoc @@ -278,7 +278,7 @@ To resolve this ambiguity you can use `_` inside your method name to manually de List findByAddress_ZipCode(ZipCode zipCode); ---- -If your property names contain underscores (e.g. `first_name`) you can escape the underscore in the method name with a second underscore. For a `first_name` property the query method would have to be named `findByFirst__name(…)`. +As we treat underscore as a reserved character we stongly advise to follow standard Java naming conventions (i.e. *not* using underscores in property names but camel case instead). [[repositories.special-parameters]] === Special parameter handling