The underscore _
is a reserved character in Spring Data query derivation (see the reference docs for details) to potentially allow manual property path description. So there are two options you have:
- Stick to the Java naming conventions of using camel-case for member variable names and everything will work as expected.
- Escape the
_
by using an additional underscore, i.e. rename your query method tofindByMunicipal__idOrderByLastnameDesc(…)
.
I'd recommend the former as you're not going to alienate fellow Java developers :).