| There are cases where database drivers raise exceptions for failing SQL that may be ambiguous or difficult to track to a root cause. When an invalid table name is referenced (e.g. during native query execution) Oracle raises: ORA-00942: table or view does not exist The table is not not mentioned and while it may sometimes be possible to track back to the code (based on a stack trace) there are many cases where it isn't easy to trace the failure back to specific application code. Some drivers appear to include the failing SQL in exception details (at least in some cases) but it isn't standard in JDBC / across drivers. It would be useful if Hibernate could include SQL in exceptions raised for SQL execution failures. |