Configuring relationships
Procedure
- On the Tasks page of the wizard, select Relationships from
the Task list.
- A relationship is a reference from one entity to another.
To add a relationship, click Add.
- Select the entity with which you want to create the relationship.
- Select the fetch type. A lazy fetch type specifies
that loading of the field is deferred until you access the field for
the first time. An eager fetch type specifies that when you retrieve
an entity, you are guaranteed that all of its fields are populated
with data store data. For example, if you have a bidirectional one-to-many
relationship between a Department entity and an Employee entity, since
most of the time, when the Department entity is fetched, its employees
are likely to be fetched, the fetch type of this one-to-many relationship
is set to EAGER.
- Select the multiplicity of the relationship.
- Specify if you want the relationship to be bidirectional
or unidirectional. A unidirectional relationship means that entity
A references entity B, but entity B does not reference entity A. A
bidirectional relationship means that the entities reference each
other.
- Select foreign keys from the list to map to primary keys.