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 "3 Transform UML Model into Hibernate Persistence Model" command.

  • Generate the persistent model’s Java classes and the associated Hibernate files using the "4 Hibernate & Java Generation" command.

  • Transform the data model into an SQL table model using the " 2 Transform Data Model into Table Model" command.

  • Generate the SQL database script from this table model using the "5 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.