Documentation Archive Developer
Search
Table of Contents Previous Section

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.

  1. In the left frame (or tree view), click the Movie entity.

    The right frame switches from a view of the entities in the model to a view of Movie's attributes.

  2. Click in the Class Property column to remove the
    symbol for the movieId attribute.

  3. Now repeat the previous step to remove studioId as a class property.

  4. In the MovieRole entity, remove movieId and talentId as class properties.

  5. In the Talent entity, remove talentId as a class property.

Table of Contents Next Section