I am wondering if there is any way to make Hibernate add comments to it's DB calls to include the code calling context, like an embedded stack trace.
We have locks on hibernate-generated code but it's difficult to map them back to the code.
posted 7 months ago
Solved it myself... I implemented a org.hibernate.resource.jdbc.spi.StatementInspector class, configured hibernate.session_factory.statement_inspector to point to the class, and wrote code: