Employee and Phone example is taken from Java Persistence wikibook.
Executed query
public Iterable<Employee> findEmployeesByPhoneNumber(String phoneNumber) {
return repository.findAll(employee.phones.any().number.contains(phoneNumber));
}
IntelliJ Idea configuration:
- Go to Preferences -> Build, Execution, Deployment -> Annotation Processors;
- Check Enable annotation processing checkbox;
- In "Store generated sources relative to:" select Module content root.
package-info.java
is required, forRevision.java
to compile.