I was reading this link about Spring Data JPA and it got me curious: Instead of using @Query annotation, can you create a query and then use it as a param to the method?
More like this:
@Repository
public interface MyRepository extends CrudRepository<MyClass, Integer>
{
void doSomething(Query query);
}
(BTW, I know I could implement a fragment repository and solve my problem, but I'm curious)