java 基于 JPA 注释生成 ERD(实体关系图)的工具

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10187048/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 23:58:49  来源:igfitidea点击:

Tool to generate a ERD (entity-relation diagram) based on JPA annotations

javaormerd

提问by Mohammad Moghimi

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

我正在使用 ormlite 编写 java 代码。我想知道是否可以从我的代码中的 JPA 注释生成 ERD。基本上,我需要相反的:如何将基于实体的图转换为 JPA java 代码

回答by Hollis Waite

IntelliJ IDEA (Ultimate) provides JPA to ER-Diagram generator.

IntelliJ IDEA (Ultimate) 为 ER-Diagram 生成器提供 JPA。

context menu

上下文菜单

In the Persistence tool window, select appropriate node. Then use context menu to select "ER Diagram".

在 Persistence 工具窗口中,选择适当的节点。然后使用上下文菜单选择“ER Diagram”。

sample ER diagram

示例 ER 图

Note that JPA facet must be linked to module and UML plugin should be active.

请注意,JPA facet 必须链接到模块,并且 UML 插件应处于活动状态。