开发者

How to generate object @Entities from database?

开发者 https://www.devze.com 2023-02-01 15:13 出处:网络
I want to generate JPA\'s @Entitys from database (but I want it to be object oriented)开发者_开发问答. for Example

I want to generate JPA's @Entitys from database (but I want it to be object oriented)开发者_开发问答. for Example

@Entity
@Table(name = "badges")
public class Badges implements java.io.Serializable {

    private Integer id;
    private User user;
    private String name;
    private String date;

It would be cool if it also support ManyToOne, OneToMany, Parent and ManyToMany.

P.S. I tried JBoss Tools(Hibernate Tools) and I did not work for me.


Use JBoss Tools (formerly hibernate tools).

Quote from their site:

Reverse Engineering: The most powerful feature of Hibernate Tools is a database reverse engineering tool that can generate domain model classes and Hibernate mapping files, annotated EJB3 entity beans, HTML documentation or even an entire JBoss Seam application in seconds!

0

精彩评论

暂无评论...
验证码 换一张
取 消