如何将基于实体的图转换为 JPA java 代码
我有使用“Sparx Enterprise Architect v8.0”创建的类图,我需要生成基于 JPA 的类,并带有反映在代码中使用它的关系的注释。 问题是我可以将其转换为 EJB,但不能将其转换为我的任务所需的 JPA。
I have class diagram created with "Sparx Enterprise Architect v8.0" and i need to generate JPA-based classes with annotations that reflect relations to use it in the code.
The problem is that i can convert it to EJB but not JPA which is required for my task.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我不知道这个产品,但是他们声称它:
一旦您拥有了数据库模式,我相信有各种工具可以对其进行逆向工程并生成 JPA 实体。 Google 中的一些随机点击:
I don't know this product, however they claim that it:
Once you have the database schema I believe there are various tools that can reverse engineer it and generate JPA entities. Few random hits in Google:
查看 Netbeans 的 JPA Modeler,它将最适合您的要求:
您可以在此处找到演示:JPA Modeler 演示 - Youtube< /a>
Have a look at the JPA Modeler for Netbeans, will be best fit for your requirement :
You can find the demo here : JPA Modeler Demo - Youtube
如果将模型导出为 ecore 格式,则可以使用 Texo 为模型生成 JPA 注释的 POJO。
If you export your model to ecore format, then you can use Texo to generate JPA annotated POJO for your model.
Spring Tool Suit 中 Marketplace 的 G9 插件完成了工作。
参考 URL https://www.esito.no/produkter/dbimport/
G9 plugin from Marketplace in Spring Tool Suit did job.
Reference URL https://www.esito.no/produkter/dbimport/