-
Notifications
You must be signed in to change notification settings - Fork 0
Target Name Transformation
Target Name Transformation (“TNT”) is a powerful and important feature of CodeModeler which allows developers to use the names of entities, properties, and views inside SQL snippets and raw queries. Therefore, it allows developers to use actual output names of objects (tables, columns, views) with the support of the defined naming convention.
The following formats are available (where the value between brackets should be replaced by the actual name):
-
$[EntityName]$ corresponds to the table name,
-
$[PropertyName]$ corresponds to the property name,
-
$[EntityName]::[PropertyName]$ corresponds to the column name,
-
$[EntityName]:[ViewName]$ corresponds to the view name,
-
$[EntityName]:[ViewName]:[PropertyName]$ corresponds to a column name in the defined view,
-
$[Namespace].[EnumerationName].[EnumerationValue]$ corresponds to the enumeration value of an enumeration declared in the model.
Note: If ever a
$EntityName$ and a$PropertyName$ conflicts, the entity name prevails.
For example, in the following image, we define a load raw method on a Customer entity but we want the method to be independent from the final table an column names:
We have also configured the entity persistence name to be “tlb_cus”:
And the property MyDate persistence name to be “dt” (“Advanced Properties” tab):
Then the output SQL will be:
(...)
SELECT * FROM [tbl_cus] WHERE [tbl_cus].[dt] = @currentDate
(...)
TNT can be used in unchecked and raw methods to allow developers to write CMQL methods mixed with platform specific code such as T-SQL as above.
- Introduction
- Architect Guide
- Concepts
- Using Visual Studio
- Overview
- Creating a CodeModeler Project
- Visual Environment
- Project Hierarchy
- Design Surface
- Customizing Design Surfaces
- Ribbon Bar
- Property Grid
- Member Format Expressions
- Model Grid
- Method Editor
- View Editor
- Instance Editor and Grid
- Resources Editor
- Inferred Model Viewer
- Building
- Project Physical Layout
- Source Control Support
- Generating
- Aspect Oriented Design (AOD)
- Developer Guide
- The Business Object Model (BOM)
- CodeModeler Query Language (CMQL)
- Starting Guide - Tutorial
- Upgrade From CFE