Save Hibernate DDL schema to a file
In case you want to store a DDL script that creates a database in your Spring Boot project in a file, all you need is to add a few properties to the app configuration.
In case you want to store a DDL script that creates a database in your Spring Boot project in a file, all you need is to add a few properties to the app configuration.
This post covers issues that may occur when you map entities with ManyToOne bidirectional association. Read about mapping this relation while avoiding LazyInitializatinException, circular dependencies, n+1 select problem, wasting resources and false-positives in tests.
When debugging a hibernate related issue, it is useful to examine queries in the console. Check out how to print them with binding parameters.