Is there any way that Hibernate exception message could be controlled so that it doesn't include the placeholder data for the failed query. e.g. for a failed insert query (lets say constraint violation), hibernate logs the exception with the input data. For privacy purpose, this needs to be removed from the logs.
1 Answer
I am not aware of any Hibernate configuration for this, but I would say that this is more suitable for logging configuration anyway.
For example, in log4j you could write custom appender/layout to intercept and replace the messages with the desired content.