# Create one-to-many mappings

Use a One-to-Many Mapping to define a relationship from an attribute to another class, with one-to-many multiplicity to a database column. In the Tutorial Object Model, the phoneNumbers field of the Employee class has a one-to-many relationship to the Phone class; each employee may have many phone numbers.

1. Select the Employee entity in the Package Explorer view.

2. In the Persistence Outline view, select the phoneNumber field of the Employee entity. The Persistence Properties view (for attributes) displays the properties for the field.

3. In the Map As field, select One-to-Many.

   One-to-many Mapping for phoneNumbers

4. On the General tab, select PhoneNumber as the Target Entity. Leave the other fields with their default values.

5. On the Join Table tab, notice that Dali has selected the correct joins, based on the foreign key associations in the database tables.

In the Persistence Outline, the phoneNumbers field is identified as a one-to-many mapping as shown in the following figure:

Persistence Outline for Employee Entity

Next, you will Create many-to-one mappings.