如何将基于实体的图转换为JPA Java代码 [英] How can I transform Entity-Based diagram to a JPA java code

查看:115
本文介绍了如何将基于实体的图转换为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.

推荐答案

我不知道此产品,但是它们声称:

I don't know this product, however they claim that it:

支持现成的11个DBMS目标的数据库模式建模和DDL脚本的自动生成

supports modeling of database schema and automatic generation of DDL scripts for eleven DBMS targets out-of-the-box

一旦有了数据库架构,我相信会有各种工具可以对其进行逆向工程并生成JPA实体.在Google中很少有随机匹配:

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:

  • Generating Persistence Mappings from Database Schema
  • Creating JPA entity beans from database tables
  • Object-Relational Mappings: Generating JPA Entities

这篇关于如何将基于实体的图转换为JPA Java代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆