Preparing Class Tables¶
The purpose of the Connector is to interact with the metadata of specific M-Files classes. Deploying the Connector does not automatically create the class tables that are relevant for the specific application.
Before creating class tables it is necessary to determine which classes should be included in the development or application of the Connector. Only create the tables that are necessary, when they are required.
Synchronizing the metadata is a prerequisite for creating a new class table. It is only necessary to perform the synchronization if the metadata structure has changed in the vault, or on a first install. Refer to Core synchronization procedures for more details.
A new class table for a class object (e.g. Customer) can be created using the Connector with spMFCreateTable
Insert a new record in a class table and ensure that the minimum requirements for columns are met.
Column |
Description / default value |
---|---|
Process_ID |
1 |
Valuelistitem _ ID |
Include the MFID of the valuelist item. There is no need to include the label of the valuelist item. |
Required properties |
Columns related to required properties must have data |
Dependencies |
If the property has scripting, automation or concatenation then the columns for all the dependent properties have data |
The following SELECT statement shows the required properties of a specific class.
SELECT mfms.TableName,
mfms.ColumnName
FROM dbo.MFvwMetadataStructure AS mfms
WHERE mfms.Required = 1
AND mfms.Property_MFID > 100
ORDER BY mfms.Class;
The procedure spMFClassTableColumns can be used to list the columns of a class table and compare them with the required properties of the class.
Goals¶
Ensure structural fidelity (all expected properties exist).
Establish consistent aliasing and lookup integrity.
Validate inclusion flags (IncludeInApp) before large batch operations.
Baseline Steps¶
-- 1. Synchronize structural metadata
EXEC dbo.spMFSynchronizeMetadata;
-- 2. Sync classes and properties explicitly if doing selective builds
EXEC dbo.spMFSynchronizeClasses;
EXEC dbo.spMFSynchronizeProperties;
-- 3. Pull specific metadata slices (e.g. value lists only)
EXEC dbo.spMFSynchronizeSpecificMetadata
@SyncScope = N'ValueListItems';
Structural Verification¶
Checklist¶
All required property columns exist (no stale / orphan columns).
Multi-value lookup expansion columns follow naming conventions.
Aliases synchronized (spMFAliasesUpsert).
Unique indexes applied if required (spMFSetUniqueIndexes).
Common Adjustments¶
Computed or staging columns (NOT pushed back to M-Files) can be prefixed (e.g. X_
or Stg_
) to distinguish from authoritative M-Files property columns.
Caution¶
Do not manually rename native property columns—use synchronization + alias routines so internal mapping stays coherent.