5. Table and Field Mapping

PROBLEM

When a domain object in configured to be persisted to a database, the database name and fields will be derived from the domain object. However there are occasions where a developer may want the table names and field names to be different than the object. There needs to be way for a developer to specify the names to be used.

SOLUTION

When a domain object is created, Skyway Builder will use the following peristence mapping defaults:

  1. Table name = domain object name

  2. Table field names = domain object field names

    This settings can be reviewed in the Persistence Mapping panel of a domain object, and they can also be modified from the panel. The settings in this panel will drive the configuration of the ORM framework.

HOW IT WORKS

This is how it works.

Figure 4.4. Persistence Mapping

Persistence Mapping