Skip to content
Advertisement

Draw an ERD from Hibernate Mapping Files

I know it’s possible to reverse engineer from the database into mapping files but does anyone know if it’s possible to get hibernate to draw an ERD based on its own mapping files so that I can compare Hibernate’s ERD with the Databases one?

Advertisement

Answer

I achieved this by using:

<property name="hibernate.hbm2ddl.auto">create-drop</property>

in my hibernate.cfg.xml

Then I used MySQL Workbench to reverse engineer an ERD from my database that was created by Hibernate.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement