views:

403

answers:

3

Hi, I would like to know if there are any tools to automatically generate EJB3 Entity Beans(for JPA) from a database schema.

Thanks.

+2  A: 

Dali supports top-down, bottom-up (this is what you're looking for), and meet-in-the-middle development approaches.

Pascal Thivent
Good Pascal. Although i use NetBeans it is a good choice.
Arthur Ronald F D Garcia
Thanks. But Netbeans supports bottom-up JPA development too: right click on a project: New -> "Entity Classes From Database". Never tested though :)
Pascal Thivent
A: 

Some of IDs have such feature, for example NetBeans

Anev
A: 

OpenJPA has a tool which will generate your Entity definitions.

From the OpenJPA user manual:

OpenJPA includes a reverse mapping tool for generating persistent class definitions, complete with metadata, from an existing database schema. You do not have to use the reverse mapping tool to access an existing schema; you are free to write your classes and mappings yourself, as described in Section 3, “ Meet-in-the-Middle Mapping ”. The reverse mapping tool, however, can give you an excellent starting point from which to grow your persistent classes.

No IDE required!

-Rick

Rick