Including Reference Entities in Join View Objects
It is extremely common in business applications to supplement information from a primary business domain object with secondary reference information to help the end user understand what foreign key attributes represent. For example, when displaying employees, rather than displaying the department number it may be more meaningful for users if the department name is displayed. The department name is in a separate entity from the employees entity.
When you create a join view object, the additional entity is most commonly used as a nonupdatable reference entity. To include a reference entity, when you create the view object (or when editing it later), perform the following steps:
1. Add the secondary entity to the view object as a Reference entity, choosing the association and join type to use.
2. Add the referenced attributes to the selected attributes for the view object.
3. When the application module is run, the referenced attributes are displayed in read-only mode.
You can include multiple referenced entities in the same view object. In fact, in most cases all but one of the entities in a view object are reference entities.
The example in the slide shows the Order entity as the primary entity for the view object. The FirstName, LastName, and PersonId attributes are added from the reference entity, Persons, to be displayed as read-only attributes.