Originally filed in spring data jpa. https://github.com/spring-projects/spring-data-jpa/issues/2629 .