JBoss.orgCommunity Documentation
Generate Entities is available by navigating to
→ → → →The wizard generates a set of CRUD Seam components and web pages based on existing tables in a database or on existing entities in your application.
By default, the generation mode is set to Reverse engineer from database. The reverse engineering from a database could be described in four steps:
The wizard gets in database, extracts the tables and their connections
On basis of this metainfomation the Entity classes are generated into org.domain.project.entity
package
For the entities from step 2 the classes EntityList and EntityHome are generated into org.domain.project.session
package
The xhtml pages are generated.
The entities are generated from a database based on the console configuration that is created automatically during a Seam project creation. (Read more about the console configuration in the Hibernate guides). The created console configuration is based on the connection profile set on the Section 2.6, “Configure Seam Facet Settings” while creating a project. Configured connection profile settings are hold in the generated hibernate-console.properties
. To change the connection profile, double-click the console configuration. It could be found in the Hibernate Configurations view ( → → → → or just switch to the Hibernate perspective).
Checking the Use existing entities mode the wizard executes only 3 and 4 steps. It generates missing classes and xhtml pages.
Read the Chapter 13, Generate a CRUD Database Application chapter in order to see how the Generate Seam Entities wizard can be used.