Context
A Java application is being developed, and the persistence of a part of the application’s data model must be ensured.
Solution
-
Transform the part of the Java data model concerned into a persistence model. To do this, use the "
Transform UML Model into Hibernate Persistence Model" command.
-
Generate the persistent model’s Java classes and the associated Hibernate files using the "
Hibernate & Java Generation" command.
-
Transform the data model into an SQL table model using the "
Transform Data Model into Table Model" command.
-
Generate the SQL database script from this table model using the "
Generate SQL script" command.
You have just produced your application’s Java data model, your database’s SQL script and the Hibernate mapping files used to ensure object/relational mapping between the Java objects and the database.