spring-projects/spring-data-jpa — pull request #97 by thomasdarimont (2014-06-17 10:19:17+00:00)
Title: DATAJPA-554 - Avoid falling back to query derivation for invalid native queries.

We now throw a dedicated InvalidJpaQueryMethodException with a more concrete exception message if we encounter a query method that is annotated with @Query(value=..., native=true) and erroneously uses a Pageable or Sort parameter. Previously we only threw a IllegalStateException which was then recovered by the org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy.CreateIfNotFoundQueryLookupStrategy which tried to do query method derivation as a last resort. This resulted in a cryptic exception message to be thrown.