tracker issue : CF-4203440

select a category, or use search below
(searches all categories and all time range)
Title:

Enhance orm setting for logging output to include DDL schema updates, else debugging is horrible

| View in Tracker

Status/Resolution/Reason: To Fix//Investigate

Reporter/Name(from Bugbase): Luis Majano / ()

Created: 11/04/2018

Components: ORM Support

Versions: 13.0

Failure Type: Others

Found In Build/Fixed In Build: /

Priority/Frequency: Normal /

Locale/System: / Platforms All

Vote Count: 1

The current orm setting for logs is `this.ormsettings.logSQL` which works great.  However, if you use the hibernate db update procedures none of the DDL statements are printed and debugging is a nightmare and nearly impossible to track down.

Add the specific hibernate settings to enable DDL debug output when the logSQL setting is true.  If not, debugging schema changes are nearly impossible. 

Here are some resources for you:

* https://blog.sebastian-daschner.com/entries/jpa_hibernate_log_schema_creation
* https://gist.github.com/rponte/1486381

Attachments:

Comments:

I came across your bug when I was dealing with this earlier this morning. You can log the DDL changes by enabling the following options in cfusion\lib\log4j.properties: log4j.additivity.org.hibernate.SQL=true log4j.logger.org.hibernate.type=DEBUG log4j.logger.org.hibernate.tool.hbm2ddl=DEBUG The down-side of this is that you need to restart the Coldfusion service every time. Your suggestion is better.
Comment by Mike H.
30075 | December 19, 2018 03:04:49 PM GMT