I have a Hibernate query that is configured to execute with Spring Data (the @Repository) annotation. I want to catch the query before it is submitted to the DB and when a specific condition is met, modify it a little bit.
What is the best option to do so? I prefere a JPA solution rather then a Hibernate solution, but a Hibernate solution will also work.