I tried using this class:
Hibernate/JPA: Check generated sql before updating DB Schema (like .NET EF migrations)
I have the following code:
pack
Normally tools that dumps the JPA schema are based on SchemaExport tool, which reads only the static metadata.
There is a Maven/Gradle plugin https://github.com/Devskiller/jpa2ddl which generates the JPA schema. In includes all properties, namings strategies, user types, etc.
You can also use it to generate automated schema migrations for Flyway.