Refining the Class Membership Query

When you have added references to your classes, the Class Query sheet of the External Schema Wizard, shown in the following image, then enables you to inspect and tailor the class membership query, based on the member tables and any columns used as attributes or references.

To inspect or tailor a generated class membership query

  1. In the Classes list box, which displays all classes defined for the current external database schema, select the class whose membership query you want to view. The SELECT and FROM clauses of the generated SQL query for your selected class are then displayed in the display area in the upper center of the sheet.

  2. In the edit area at the lower center of the sheet, specify an optional WHERE clause, if required. If your class uses two or more tables, you must specify the JOIN condition for the tables in this edit area. You can also use the WHERE clause to exclude rows of the selection (equivalent to object instances) from the class membership.

  3. In the edit area at the lower center of the sheet, specify an optional ORDER BY clause, if required. You can use the ORDER BY clause to determine the order in which rows of the selection (equivalent to object instances) are iterated through when accessing the instances collection of the selected class.

  4. To save your specified SQL query clause for the class, click the Save button. The query is then validated by the current driver (if you are currently connected to the external relational database) before your query is saved.

  5. To return to your original query for the selected class (that is, to refresh the screen), click the Default Query button.

  6. Repeat steps 1 through 4 for each class whose query you want to inspect or to tailor.

    If you have made any changes to your class query that you have not yet saved, a warning is issued before the next class (or sheet) is displayed.

  7. Click the Next > button when you have inspected or tailored all required class membership queries. Alternatively, click the Close button to close the wizard.

When you click the Next > button, the External Schema Wizard then enables you to inspect Collection class queries.