We've expanded our news coverage and improved our search! Visit
oreilly.com for the latest or search for all things across O'Reilly!
Article:
 |
|
Hibernate Your Data
|
| Subject: |
|
Code gen to generate Java Classes |
| Date: |
|
2004-12-30 17:05:29 |
| From: |
|
dvohra09
|
|
|
In the tutorial the java classes, with the getter and the setter methods, were created prior to the retrieving and storing of the data in the database. Hibernate has the provision to generate the java classes from the hbm.xml configuration file with the Hibernate code generation class
net.sf.hibernate.tool.hbm2java.hbm2JavaTask.
Also, the database tables were created prior to the implementing the Hibernate features. Hibernate provides the schema generation class
net.sf.hibernate.tool.hbm2ddl.SchemaExportTask to generate the database schema for a hbm.xml configurtion file.
|