fix(meta-compile): parse shorthand syntax for Task AddressingAttributes

AddressingAttribute was taking the entire shorthand string (e.g.
"Name: String(100)") as the attribute name instead of parsing it
through Parse-AttributeShorthand. This caused String type without
length qualifiers (NTEXT in SQL), making Index creation impossible.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-03-08 13:47:38 +03:00
parent 589091510b
commit 5a1974be4e
2 changed files with 10 additions and 15 deletions
@@ -2392,13 +2392,11 @@ function Emit-AddressingAttribute {
$addressingDimension = ""
$indexing = "Index"
if ($addrDef -is [string]) {
$name = "$addrDef"
$attrSynonym = Split-CamelCase $name
} else {
$name = "$($addrDef.name)"
$attrSynonym = if ($addrDef.synonym) { "$($addrDef.synonym)" } else { Split-CamelCase $name }
if ($addrDef.type) { $typeStr = "$($addrDef.type)" }
$parsed = Parse-AttributeShorthand $addrDef
$name = $parsed.name
$attrSynonym = $parsed.synonym
$typeStr = $parsed.type
if ($addrDef -isnot [string]) {
if ($addrDef.addressingDimension) { $addressingDimension = "$($addrDef.addressingDimension)" }
if ($addrDef.indexing) { $indexing = "$($addrDef.indexing)" }
}
@@ -2068,14 +2068,11 @@ def emit_addressing_attribute(indent, addr_def):
type_str = ''
addressing_dimension = ''
indexing = 'Index'
if isinstance(addr_def, str):
name = addr_def
attr_synonym = split_camel_case(name)
else:
name = str(addr_def.get('name', ''))
attr_synonym = str(addr_def['synonym']) if addr_def.get('synonym') else split_camel_case(name)
if addr_def.get('type'):
type_str = str(addr_def['type'])
parsed = parse_attribute_shorthand(addr_def)
name = parsed['name']
attr_synonym = parsed['synonym']
type_str = parsed['type']
if not isinstance(addr_def, str):
if addr_def.get('addressingDimension'):
addressing_dimension = str(addr_def['addressingDimension'])
if addr_def.get('indexing'):