Add the extended properties of the Project to the Table_EntityFields. This step provides additional columns for the Project record in addition to the standard columns in Table_EntitiesMain.
Note |
---|
The entity system in the database uses pivot queries to manage column-based information with row based information as if they are all columns in a table. Any additional definitions provided in Table_EntityFields will be used as columns during the select statement for type Entity types. |
These columns must be added to Table_EntityFields:
Asset
StartDate
ProjectedEndDate
ActualEndDate
Status
The following types of fields are used for extended entity columns:
Standard
LongText
AssetID
Run the script below to insert the records into the table. It is a mapping table and requires the ID of the new entity.
declare @projectTypeID int select @projectTypeID = ID from Table_EntityTypes where ClassPath = 'Cartella.Classes.Project' insert into Table_EntityFields (ID_EntityType, FieldName, FieldLabel, ID_FieldType) values (@projectTypeID, 'Asset', 'Related Assets', 3) insert into Table_EntityFields (ID_EntityType, FieldName, FieldLabel, ID_FieldType) values (@projectTypeID, 'Z1StartDate', 'Start Date', 1) insert into Table_EntityFields (ID_EntityType, FieldName, FieldLabel, ID_FieldType) values (@projectTypeID, 'Z2ProjectedEndDate', 'Projected End Date', 1) insert into Table_EntityFields (ID_EntityType, FieldName, FieldLabel, ID_FieldType) values (@projectTypeID, 'Z3ActualEndDate', 'Actual End Date', 1) insert into Table_EntityFields (ID_EntityType, FieldName, FieldLabel, ID_FieldType) values (@projectTypeID, 'Z4CurrentStatus', 'Current Status', 1)