views:

40

answers:

2

Hi, I got an existing table in Oracle database how can I generate my Hibernate Java class etc from this table?

Using Eclipse 3.2, Java 5

A: 

Do you mean generate a POJO that maps to the table? You can use the Hibernate Tools plugin for Eclipse. Otherwise you can create the POJO manually and map it to the table using Hibernate Annotations.

BrennaSoft
A: 

The Hibernate Tools for Eclipse and Ant does support reverse engineering. From the website:

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!

Refer to the provided link for more details.

Pascal Thivent