How to intercept and modify SQL queries with the Hibernate StatementInspector

Introduction A very useful, yet lesser-known, Hibernate feature is the ability to intercept and modify any auto-generated SQL statement using the Hibernate StatementInspector utility. In this article, we are going to see how the Hibernate StatementInspector mechanism works.