|
1. Defining the Object Model
The first step in creating a ReStore application is to define your data model - the structure of your model classes. This allows ReStore to automatically create database rows from your objects, and also to create the actual database table in which those rows will exist.
Defining the structure of a class is done with the class method addClassDefinitionTo:. This method simply lists the name of each instance variable in the class, and defines the type of object held in that instance variable. The 'type' of object will be either a class, a parameterised class, or a collection. These different types are highlighted in the following example from the Entertainment Shop class Order:
addClassDefinitionTo: aTable aTable
|
"Class" "Class" "Collection" "Class" "Parameterised Class" "Class" |
1. Defining Classes