About Data Objects

Data Objects are an integral part of the NetForum Object Model, binding the tables in the NetForum database to a NetForum Facade Object. They provide the data definition for the Object. Describing the tables that the the system uses for the data storage and retrieval for the Object, Data Objects determine what controls (fields) are available on the Forms for the Object and therefore determine what data is inserted, updated, deleted and selected by the Object. Data Objects can be defined in metadata, or in custom programming code.

NetForum Objects have a primary Data Object, the 3 character prefix of which is the same as the prefix for the Object. NetForum Objects can have, in theory, unlimited secondary Data Objects.

In some cases, a Data Object might have virtual controls (fields) - added to the Data Object in custom programming code and not associated with a database table or column.

See Examples of netFORUM Objects and their Data Objects for examples.

Data Mapping

For a Dynamic Facade Object, the primary Data Object's prefix is stored with the Object's definition in the md_object data table and Secondary Data Object information is stored in the md_object_data table. The the system uses metadata to initialize the Data Objects for a Dynamic Facade Object.

For a Static Facade Object, the prefix for the data table most closely associated with the object is stored in the md_object data table, but it is possible that a Static Facade Object will not use this information. The framework initializes the Data Objects for a Static Facade Object in the Object's custom programming code. See Avectra.netForum.Data.DynamicData for information about the class that is used to create Static Facade Objects in .NET code.