views:

870

answers:

4

may i know in eclipse, is there any feature that will auto generate domain objects with all table relationship properly mapped in class?

can provide me with some reference articles on this?

+3  A: 

You can use something like Hibernate to accomplish this

This plugin set for Eclipse called Hibernate Tools for Eclipse and ANT will do most of the work for you.

In particular it will do 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!

Vinko Vrsalovic
+1  A: 

You want an object relational mapping of which Hibernate is the most popular for Java. The hibernate tools are typically better for taking annotated classes and using them to generate a schema, as opposed to vice versa, which is what you sound like you're doing. I suspect you'll be doing a lot of hand-annotating if you're working with a legacy DB schema.

Jherico
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! https://www.hibernate.org/255.html
Vinko Vrsalovic
+1  A: 

You can use Hibernate Tools 3.0.0.GA either via Eclipse or ANT to auto-generate your hibernate domain entities directly from your database tables.

See tutorial here : http://docs.jboss.org/tools/3.0.0.GA/en/hibernatetools/html_single/index.html

Aries McRae
A: 

if you use grails, you can generate domain objects with GRAG http://sourceforge.net/projects/grag

dementiev