Skip to content
Carlo Barazzetta edited this page Dec 4, 2018 · 8 revisions

Class Editor - Class Page

This is where you specify the name and base class, the model unit to hold the class and the persistence properties of the class.

The class name can be any valid Object Pascal class identifier. The default base class of any business class is TInstantObject,the class from which persistence capabilities are inherited. When classes are present in your model, you can choose any of these as the immediate base class instead. The model unit in which a new class will be placed can be selected from the list of available model units. This entry is read only when editing an existing class. The class persistence can be defined as either stored or embedded. Instances of stored classes can be independently stored in and retrieved from the database. An instance of an embedded class can exist in the database only as an attribute of its owner, which is another embedded or stored class instance. In practice this means that the attribute values of an embedded class are stored in the database in a BLOB type field. Therefore, if you want instances of a class to be independently retrievable or available by query, define the class persistence as stored. Stored persistence is also required for those classes used byReference attributes or other attributes with externalstorage. A class, used only for objects that are owned byother objects, should be defined with embedded persistence if theowning objects use embedded storage for the attribute. If, however,the owning objects use external storage kind for the attribute, definethe owned class with stored persistence. For classes with stored persistence, a storage name can bespecified. The storage name defines the name of the table, in whichattributes of instances of the class are stored. By default, the storagename equals the class name without the preceding 'T'. Change thedefault storage name as desired.

Clone this wiki locally