How can I edit this piece of code used with hibernate 3 in order to corresponds to hibernate 5.6.1 version.
I see that Formatter is now an interface with one single method.
How can I edit this piece of code used with hibernate 3 in order to corresponds to hibernate 5.6.1 version.
I see that Formatter is now an interface with one single method.
For "basic SQL statements (DML + query)", please "try":
Formatter formatter = new org.hibernate.engine.jdbc.internal.BasicFormatterImpl();
formatter.format(query);
For "DDL SQL statements", please:
Formatter formatter = org.hibernate.engine.jdbc.internal.DDLFormatterImpl.INSTANCE;
formatter.format(query);
For "indent-/initialString" please consider a custom implementation, you can base on((/see source code of) the mentioned: