Does anyone know if there is a plugin available for IntelliJ that will draw the database schema diagram based on JPA entity classes?
To create a new database diagramIn Object Explorer, right-click the Database Diagrams folder or any diagram in that folder. Choose New Database Diagram on the shortcut menu. The Add Table dialog box appears. Select the required tables in the Tables list and click Add.
Generate a database entityClick Code | Generate or press Alt+Insert . Select the entity that you want to generate and press Enter .
File, Project Settings, click "+". Select the module which contains Java classes annotated with JPA. Then add JPA facet like this:
Make sure you choose your framework correctly:
Then follow this steps:
IntelliJ (ultimate edition) can generate an ER diagram, without any additional plugins. It's available from the context menu in the "Persistence" pane.
To get that pane, you'll need to add a "JPA" facet to your module first.
pre-requisite to get "ER Diagram" entry in the context menu :
I just add this comment into the official documentation (comment awaiting moderation).
Official doc : http://www.jetbrains.com/idea/webhelp/opening-jpa-or-hibernate-er-diagram.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With