EDT — data type
Updated
What it is#
Extended Data Type: one place to edit precision/format. There are two kinds: scalar (Decimal(18,2), String(50)...) and reference (Reference to a dictionary — replaces a "bare Guid"; see the root rule "always a reference, never a bare Guid"). The EDT is declared by the owning module and reused through a dependency declared in model.json (see §8.1 shared dictionary).
JSON envelope#
<Name>.json, "kind": "EDT" — one file, no subarrays.
Scalar:
{
"kind": "EDT",
"object": {
"edtType": "Scalar",
"baseType": "Decimal", "precision": 18, "scale": 4,
"metaId": "<GUID EDT>", "name": "Qty", "modelId": "<GUID Model>"
}
}
Referential:
{
"kind": "EDT",
"object": {
"edtType": "Reference",
"referenceDictionaryMetaId": "<GUID Dictionary>",
"isRequired": false,
"metaId": "<GUID EDT>", "name": "RefCountry", "modelId": "<GUID Model>"
}
}
An integer is only baseType: "Integer"; the type catalog does not accept "Int" (it is not import that fails, but schema/sync: "Base type 'Int' is not in the catalog" — the object exists in the database, but there is no table for it).
C# base#
No separate class is declared. The EDT defines the property type of the generated entity (decimal/string/Guid with typed access through navigation for Reference). For a reference EDT, the platform generates a navigation property to the typed record of the target dictionary.
Events / Chain of Command#
None — EDT is static and supports no events. Changing precision (precision/scale) is an edit to THIS file and affects all objects that declared a field with this EDT at the next schema/sync.
Example#
RefCountry (Reference to Country) and Qty (Decimal(18,4), owner Inventory) — see shared EDT dictionary §8.1.