Associate the Entity with a Database Table


Now you must associate each entity with its primary database table.

  1. Select the Employee class in the Explorer view.

  2. In the Persistence Properties view, select General tab.

  3. On the General tab notice that Dali has automatically selected the EMPLOYEE table as the Table Name.

    Persistence Properties View for the Employee Entity

    This figure shows the Persistence view for the Employee entity.

By default, Dali attempts to associate each entity with a similarly named database table. Notice that although you have not explicitly associated the Address entity yet, there is no error in the Problems view because the entity name, Address, is identical to the table name (ADDRESS).

For the PhoneNumber entity, however, there is an error. This is because the entity name (PhoneNumber) is different than the database table (PHONE). You must explicitly associate the entity with the PHONE table.

Now you are ready to Create OR Mappings.