Tips for Specifying Relationships
The following tips are useful to keep in mind as you add relationships
to your model:
- The relationships
you define in a model must reflect corresponding implementations in
the data source, as well as the features supported by the adaptor
your model uses. Enterprise Objects doesnt know, for example,
if your adaptor supports left outer joins, so you need to be careful
with regard to the characteristics you set for relationships.
- Use the diagram view to quickly create pairs of inverse relationships
by Control-dragging between source and destination attributes.
- Use the Relationship Inspector to specify information about
a relationship, such as whether its to-one or to-many, its semantics
(join type), the destination model, and the destination entity in
the destination model.
- Relationships can be compound, meaning that they can consist
of multiple pairs of connected attributes. You can specify additional
pairs of attributes only in the Relationship Inspector. Simply select
a second source attribute and a second destination attribute and
click Connect a second time.
- A to-one relationship from one foreign key to a primary key
must always have exactly one row in the destination entityif
this isnt guaranteed to be the case, use a to-many relationship.
This rule doesnt apply to a foreign key to primary key relationship
where a
null value for
the foreign key in the source row indicates that no row exists in
the destination. - To-one relationships must join on the complete primary key
of the destination entity.
© 2002 Apple Computer, Inc. (Last Updated November 2002)