Table of Contents

TMappingExplorer Class

Central registry and inspector for the Aurelius mapping model, providing access to entity metadata, class hierarchy, and RTTI-based data manipulation.

Remarks

TMappingExplorer loads and caches entity type metadata (tables, columns, associations, identifiers, inheritance strategies, etc.) for all mapped classes belonging to a named model. It is used internally by TObjectManager to resolve entity structure during SQL generation and object hydration. Multiple independent mapping models are supported: each model is identified by a ModelName string and managed through the global class functions Get, Replace, Default, and ReplaceDefault. The default model name is 'Default' and corresponds to entities registered without an explicit model. Instances can be created with a TMappingSetup for custom or isolated mapping configurations, or with a model name to use the globally registered class list for that model.

Syntax

Unit: Aurelius.Mapping.Explorer

TMappingExplorer = class(TObject);

Constructors

Name Description
Create Creates a TMappingExplorer for the mapping model identified by the given name.

Methods

Name Description
AddDynamicProperty Registers a dynamic property definition for the specified class.
Default Returns the global TMappingExplorer for the default mapping model.
Get Returns the global TMappingExplorer instance registered under the given model name.
Replace Registers a TMappingExplorer instance as the global explorer for the given model name, replacing any previously registered instance.
ReplaceDefault Registers a TMappingExplorer instance as the global explorer for the default mapping model, replacing any previously registered instance.
ReplaceDefault​Instance Registers a TMappingExplorer instance as the global explorer for the default mapping model, replacing any previously registered instance.

Properties

Name Description
CustomSetup Indicates whether this explorer was created with an explicit set of mapped classes via a TMappingSetup rather than the global model registry.
Events Gets the event manager used to subscribe to entity lifecycle callbacks for all managers that share this explorer.
ModelName Gets the name of the mapping model associated with this explorer.
ObjectFactory Gets or sets the factory used to instantiate entity objects during hydration.
OnGlobalCreate Event fired each time a new TMappingExplorer instance is created, allowing global customization or registration of mapping setup callbacks.