Variables with underscore create error saying "Description Resource Path Location Type Invalid derived query! No property _db found for type String! Traversed path: Trnsction.ddate. ..."
I have "spring-data-commons » 1.11.2.RELEASE" and in this version, the problem seems to be solved (https://jira.spring.io/browse/DATACMNS-569) but in my repository class, when I add a method like below, still it doesn't compile although I escape underscore.
List<Trnsction> findByDdate__db(Date ddate__db);
The name of my variable is ddate_db and its type is Date.
This "problem" is not fixed and probably won't be fixed.
As said in JIRA ticket:
I think we're gonna change that to fixing the documentation rather that adding that feature as it would just lead to ambiguities in method names and very ugly method names in general. The general recommendation is to stick to Java coding style, i.e. use camel case for property names.
Also in documentation:
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).
So you should not use underscore in your variable names.