Editing Class Mappings
- To edit the Hibernate class mapping file, right-click any class and select Edit Mapping... from the context menu.

-
On the next screen, select the inheritance tree mapping for the class. The user can set how the class will be mapped in a database. This step will be displayed only for those classes that have a persistent super class. For the topmost class this step will be skipped.
-
After clicking Next, this screen will be displayed to allow the editing of mapping properties.
-
After clicking Next, this screen will be displayed to allow editing the primary keys for the database table and setup a generator. You can add an existing column as a primary key, create a new a column in the table as a primary key, or remove a column as a primary key.
Clicking on the Generator... button while a column is selected brings up a dialog box for specifying the generator based on that column. You can choose to use the built-in generator or another generator. In this dialog box, you can also establish parameters for the generator.
-
After clicking Next on the primary key page, you can edit identification properties on the next page.
Pressing the Map PK... button, allows you to modify or remove identification.
-
After clicking Next on the identification properties page, you can create or remove discriminator column mappings on the next page.
-
After clicking Next on the discriminator column mappings page, you can create or remove version property mapping on the next page.
-
Finally, after clicking Next again, on the next page, you can set custom SQL queries to insert, update and delete what the class is mapped to.
-
Click Finish to save all of your changes.