Removing Primary and Foreign Keys as Class Properties
By default, EOModeler makes all of an entity's attributes class properties. When an attribute is a class property, it means that the property is a part of your enterprise object, usually as an instance variable.You should mark as class properties only those attributes whose values are meaningful in the objects that are created when you fetch from the database. Attributes that are essentially database artifacts, such as primary and foreign keys, shouldn't be marked as class properties unless the key has meaning to the user and must be displayed in the user interface.
Eliminating primary and foreign keys as class properties has no adverse effect on how Enterprise Objects Framework manages enterprise objects in your application.
- In the left frame (or tree view), click the Movie entity.
- Click in the Class Property column to remove the
symbol for the movieId attribute. - Now repeat the previous step to remove studioId as a class property.
- In the MovieRole entity, remove movieId and talentId as class properties.
- In the Talent entity, remove talentId as a class property.
The right frame switches from a view of the entities in the model to a view of Movie's attributes.
Table of Contents Next Section