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?
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?
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!
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.
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
if you use grails, you can generate domain objects with GRAG http://sourceforge.net/projects/grag