I'm writing a java code using ormlite. I was wondering if it's possible to generate an ERD from the JPA annotations in my code. Basically, I need the reverse of this: How can I transform Entity-Based diagram to a JPA java code
Asked
Active
Viewed 2.3k times
16
-
1Can't you let JPA create the tables and then generate the ERD from the actual database? – Apr 17 '12 at 08:34
-
2That's a possibility. You mean something like this? http://stackoverflow.com/questions/2488/auto-generate-database-diagram-mysql right? But It'd be better if is possible to generate ERD directly from java codes. – Mohammad Moghimi Apr 17 '12 at 18:38
1 Answers
16
IntelliJ IDEA (Ultimate) provides JPA to ER-Diagram generator.
In the Persistence tool window, select appropriate node. Then use context menu to select "ER Diagram".
Note that JPA facet must be linked to module and UML plugin should be active.

Hollis Waite
- 1,079
- 1
- 20
- 31