Associate the entity with a database table |
Now you must associate each entity with its primary database table.
Select the Employee class in the Explorer view.
In the Persistence Properties view, select General tab.
On the General tab, notice that Dali has automatically selected the EMPLOYEE table as the table name.
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. Dali adds the @Table(name="PHONE")
annotation to the entity.
Now you are ready to Create OR mappings.