In my @Repository interface I created custom find method with JPQL @Query that contains parameter (addressType).
from Address a where a.addressType = :addressT
The answer given by @JB Nizet is correct, but I just wanted to point out the way to add the -parameters
flag for the Java 8 compiler when using Eclipse. This is in Window -> Preferences:
Maven also allows adding the flags in the pom itself:
org.apache.maven.plugins
maven-compiler-plugin
3.5.1
-verbose
-parameters
To add parameters flag for Java 8 compiler when using IDEA IntelliJ
File > Settings > Build, Execution, Deployment > Compiler > Java Compiler