Skip Headers

# Reference EIS Mappings

Previous

Next

In a reference EIS mapping ("EIS One-to-One Mapping" and "EIS One-to-Many Mapping"), the source object contains only a foreign key (pointer) to the target object or, alternatively, the target object contains a foreign key to the source object (key on target).

TopLink puts the foreign key of the target object into the source object's record as a simple value. When an interaction is executed on the source object, TopLink uses the selection interaction that you define on its descriptor to retrieve the appropriate target object instance and creates a record for it in the source object's transaction. By default, the selection interaction is the target object's read interaction. If the read interaction is not sufficient, you can define a separate selection interaction (see "Configuring Selection Interaction"). Because both the source and target object use interactions, they must both be of a root object type (see "Configuring an EIS Descriptor as a Root or Composite Type").

Figure: EIS Reference Mappings illustrates a read interaction on an instance of the `Order` class using indexed records. For the one-to-one EIS mapping defined for the `customer` attribute, TopLink puts the target `Customer` object's foreign key into the `Order` record as a simple value. TopLink then uses the selection interaction you configure on the `Order` descriptor to retrieve the appropriate instance of `Customer` and creates a record for it in the `Order` object's transaction.

EIS Reference Mappings

Description of "EIS Reference Mappings"