Documentation Archive Developer
Search
PATH  WebObjects 4.0 Documentation > Getting Started With WebObjects

Table of Contents Previous Section

Removing Primary and Foreign Keys
as Class Properties

By default, the wizard makes all of an entity's attributes, except primary keys, 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 studioId attribute (the wizard already removed movieId as a class property).

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

  4. If you are using OpenBase Lite, remove the RowId attributes from the Movie, MovieRole, and Talent entities, since they are not used in this tutorial.

    While RowId is selected, choose Cut from the Edit menu.

Table of Contents Next Section